GetStoreInfo
Returns the client-side configuration of the given store, such as the API and pay station URLs a client needs to open the store's checkout. Currently only Xsolla returns store info.
| Service | Operation |
|---|---|
| appStore | GET_STORE_INFO |
Method Parameters
| Parameter | Description |
|---|---|
| storeId | The store to query, e.g. "xsolla". Refer to the current available store IDs here. |
note
- Xsolla (
xsolla) returnsstoreApiBaseUrl,payStationBaseUrl,projectId,sandboxandconsumeOnPurchase.payStationBaseUrlishttps://sandbox-secure.xsolla.com/paystation4when the integration's sandbox is on, andhttps://secure.xsolla.com/paystation4when it is off.consumeOnPurchasetells the client whether brainCloud consumes a purchased item on the server. When it istrue, the client must not consume the item itself. It is onlytruewhen the setting is on and the integration has both a project id and an API key — without the API key the server skips the consume, so the client still has to do it. The API key itself is never returned.- If the app has no Xsolla integration configured, only
storeApiBaseUrlandpayStationBaseUrlare returned.
- Other stores currently return an empty
storeInfo. - An unknown
storeIdfails with HTTP 400 and reason codeINVALID_STORE_ID(40700).
Usage
http://localhost:3000
- C#
- C++
- Obj-C
- Java
- JavaScript
- Dart
- Roblox
- GDScript
- Lua
- Cloud Code
- Raw
string storeId = "xsolla";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.AppStoreService.GetStoreInfo(storeId, successCallback, failureCallback);
const char *storeId = "xsolla";
_bc->getAppStoreService()->getStoreInfo(storeId, this);
NSString *storeId = @"xsolla";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc appStoreService] getStoreInfo:storeId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String storeId = "xsolla";
this; // implements IServerCallback
_bc.getAppStoreService().getStoreInfo(storeId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var storeId = "xsolla";
_bc.appStore.getStoreInfo(storeId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var storeId = "xsolla";
ServerResponse result = await _bc.appStoreService.getStoreInfo(storeId:storeId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
local storeId = "xsolla"
local callback = function(success, response)
if success then
print("Success")
else
print("Failed | " .. tostring(response.status_message))
end
end
_bc.appStore:getStoreInfo(storeId, callback)
var store_id = "xsolla"
var result = await _bc.app_store_service.get_store_info(store_id)
if result.status == 200:
print("Success")
else:
print("Failed: %s" % result.status_message)
local storeId = "xsolla"
local callback = function(success, response)
if success then
print("Success")
else
print("Failed | " .. tostring(response.status_message))
end
end
_bc.appStore:getStoreInfo(storeId, callback)
var storeId = "xsolla";
var appStoreProxy = bridge.getAppStoreServiceProxy();
var postResult = appStoreProxy.getStoreInfo(storeId);
if (postResult.status == 200) {
// Success!
}
{
"service": "appStore",
"operation": "GET_STORE_INFO",
"data": {
"storeId": "xsolla"
}
}
JSON Response
{
"data": {
"storeInfo": {
"storeApiBaseUrl": "https://store.xsolla.com/api",
"payStationBaseUrl": "https://sandbox-secure.xsolla.com/paystation4",
"projectId": "123456",
"sandbox": true,
"consumeOnPurchase": true
}
},
"status": 200
}