Package com.bitheads.braincloud.services
Class AppStoreService
java.lang.Object
com.bitheads.braincloud.services.AppStoreService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcachePurchasePayloadContext(String storeId, String iapId, String payload, IServerCallback callback) Before making a purchase with the IAP store, you will need to store the purchase payload context on brainCloud so that the purchase can be verified for the proper IAP product.voidfinalizePurchase(String storeId, String transactionId, String jsonTransactionData, IServerCallback callback) Finalize A Two Staged Purchase Transaction Service Name - AppStore Service Operation - FinalizePurchasevoidgetEligiblePromotions(IServerCallback callback) Returns the eligible promotions for the player.voidgetSalesInventory(String storeId, String userCurrency, IServerCallback callback) Method gets the active sales inventory for the passed-in currency type.voidgetSalesInventoryByCategory(String storeId, String userCurrency, String category, IServerCallback callback) Method gets the active sales inventory for the passed-in currency type.voidrefreshPromotions(IServerCallback callback) Returns up-to-date eligible 'promotions' for the user and a 'promotionsRefreshed' flag indicating whether the user's promotion info required refreshing.voidstartPurchase(String storeId, String jsonPurchaseData, IServerCallback callback) Start A Two Staged Purchase Transaction Service Name - AppStore Service Operation - StartPurchasevoidverifyPurchase(String storeId, String jsonReceiptData, IServerCallback callback) Verifies that purchase was properly made at the store.
-
Constructor Details
-
AppStoreService
-
-
Method Details
-
verifyPurchase
Verifies that purchase was properly made at the store. Service Name - AppStore Service Operation - VerifyPurchase- Parameters:
storeId- The store platform. Valid stores are: - itunes - facebook - appworld - steam - windows - windowsPhone - googlePlayjsonReceiptData- The specific store data requiredcallback- The method to be invoked when the server response is received
-
getEligiblePromotions
Returns the eligible promotions for the player. Service Name - AppStore Service Operation - EligiblePromotions- Parameters:
callback- The method to be invoked when the server response is received
-
getSalesInventory
Method gets the active sales inventory for the passed-in currency type. Service Name - AppStore Service Operation - GetInventory- Parameters:
storeId- The store platform. Valid stores are: - itunes - facebook - appworld - steam - windows - windowsPhone - googlePlayuserCurrency- The currency type to retrieve the sales inventory for.callback- The method to be invoked when the server response is received
-
getSalesInventoryByCategory
public void getSalesInventoryByCategory(String storeId, String userCurrency, String category, IServerCallback callback) Method gets the active sales inventory for the passed-in currency type. Service Name - AppStore Service Operation - GetInventory- Parameters:
storeId- The store platform. Valid stores are: - itunes - facebook - appworld - steam - windows - windowsPhone - googlePlayuserCurrency- The currency type to retrieve the sales inventory for.category- The product categorycallback- The method to be invoked when the server response is received
-
startPurchase
Start A Two Staged Purchase Transaction Service Name - AppStore Service Operation - StartPurchase- Parameters:
storeId- The store platform. Valid stores are: - itunes - facebook - appworld - steam - windows - windowsPhone - googlePlayjsonPurchaseData- specific data for purchasing 2 staged purchasescallback- The method to be invoked when the server response is received
-
finalizePurchase
public void finalizePurchase(String storeId, String transactionId, String jsonTransactionData, IServerCallback callback) Finalize A Two Staged Purchase Transaction Service Name - AppStore Service Operation - FinalizePurchase- Parameters:
storeId- The store platform. Valid stores are: - itunes - facebook - appworld - steam - windows - windowsPhone - googlePlaytransactionId- the transactionId returned from start PurchasejsonTransactionData- specific data for purchasing 2 staged purchasescallback- The method to be invoked when the server response is received
-
cachePurchasePayloadContext
public void cachePurchasePayloadContext(String storeId, String iapId, String payload, IServerCallback callback) Before making a purchase with the IAP store, you will need to store the purchase payload context on brainCloud so that the purchase can be verified for the proper IAP product. This payload will be used during the VerifyPurchase method to ensure the user properly paid for the correct product before awarding them the IAP product. Service Name - AppStore Service Operation - CachePurchasePayloadContext- Parameters:
storeId- The store platform. Valid stores are: - itunes - facebook - appworld - steam - windows - windowsPhone - googlePlayiapId- The IAP product Id as configured for the product on brainCloud.payload- The payload retrieved for the IAP product after the GetSalesInventory method.callback- The method to be invoked when the server response is received
-
refreshPromotions
Returns up-to-date eligible 'promotions' for the user and a 'promotionsRefreshed' flag indicating whether the user's promotion info required refreshing. Service Name - AppStore Service Operation - RefreshPromotions- Parameters:
callback- The method to be invoked when the server response is received
-