![]() |
Gamebase SDK for Android 2.49.0
NHN Cloud Gamebase Platform
|
This class provides wrapping of function execution related to payment. More...
Static Public Member Functions | |
static void | requestPurchase (@NonNull final Activity activity, @NonNull final String gamebaseProductId, @NonNull final GamebaseDataCallback< PurchasableReceipt > callback) |
Request Purchasing Item registered in the console with the gamebaseProductId. More... | |
static void | requestPurchase (@NonNull final Activity activity, @NonNull final String gamebaseProductId, @NonNull final String payload, @NonNull final GamebaseDataCallback< PurchasableReceipt > callback) |
Request Purchasing Item registered in the console with the gamebaseProductId. More... | |
static void | requestPurchase (@NonNull final Activity activity, final long itemSeq, @NonNull final GamebaseDataCallback< PurchasableReceipt > callback) |
Request Purchasing Item that has itemSeq. More... | |
static void | requestItemListPurchasable (@NonNull final Activity activity, @NonNull final GamebaseDataCallback< List< PurchasableItem > > callback) |
Request a item list which is purchasable. More... | |
static void | requestItemListAtIAPConsole (@NonNull final Activity activity, @NonNull final GamebaseDataCallback< List< PurchasableItem > > callback) |
Request a item list which is purchasable. More... | |
static void | requestItemListOfNotConsumed (@NonNull final Activity activity, @NonNull final PurchasableConfiguration configuration, @NonNull final GamebaseDataCallback< List< PurchasableReceipt > > callback) |
Request a Item List which is not consumed. More... | |
static void | requestActivatedPurchases (@NonNull final Activity activity, @NonNull final PurchasableConfiguration configuration, @NonNull final GamebaseDataCallback< List< PurchasableReceipt > > callback) |
Request a list of payment products that are currently subscribed. More... | |
static void | requestItemListOfNotConsumed (@NonNull final Activity activity, @NonNull final GamebaseDataCallback< List< PurchasableReceipt > > callback) |
Request a Item List which is not consumed. More... | |
static void | requestActivatedPurchases (@NonNull final Activity activity, @NonNull final GamebaseDataCallback< List< PurchasableReceipt > > callback) |
Request a list of payment products that are currently subscribed. More... | |
static void | requestSubscriptionsStatus (@NonNull final Activity activity, @NonNull final PurchasableConfiguration configuration, @NonNull final GamebaseDataCallback< List< PurchasableSubscriptionStatus > > callback) |
Request a list of purchased subscription status. More... | |
static void | requestRetryTransaction (@NonNull final Activity activity, @NonNull final GamebaseDataCallback< PurchasableRetryTransactionResult > callback) |
'Deprecated API'. More... | |
static String | getStoreCode () |
Gets the store code of the current app. More... | |
static void | setStoreCode (final String storeCode) |
Set the store code of the current app. More... | |
This class provides wrapping of function execution related to payment.
|
static |
Gets the store code of the current app.
This should only be called after the SDK has been initialized by calling Gamebase.initialize().
|
static |
Request a list of payment products that are currently subscribed.
If there is a subscription purchased from another platform (such as iOS), the itemSeq value is returned as -1.
activity | current Activity. |
callback | callback pass to API result. |
com.toast.android.gamebase.base.purchase.PurchasableReceipt
. com.toast.android.gamebase.GamebaseDataCallback
.
|
static |
Request a list of payment products that are currently subscribed.
If there is a subscription purchased from another platform (such as iOS), the itemSeq value is returned as -1.
activity | current Activity. |
configuration | sets additional conditions for retrieving results. |
callback | callback pass to API result. |
Example Usage:
PurchasableConfiguration
. com.toast.android.gamebase.base.purchase.PurchasableReceipt
. com.toast.android.gamebase.GamebaseDataCallback
.
|
static |
Request a item list which is purchasable.
This list has items which are only registered in ToastCloud IAP Console, not Market(Google, OneStore)
activity | current Activity. |
callback | callback pass to API result. |
|
static |
Request a Item List which is not consumed.
You should deliver this itemReceipt info to your game-server to consume it or request consumeAPI to ToastCloud IAP Server.
activity | current Activity. |
callback | callback pass to API result. |
com.toast.android.gamebase.base.purchase.PurchasableReceipt
. com.toast.android.gamebase.GamebaseDataCallback
.
|
static |
Request a Item List which is not consumed.
You should deliver this itemReceipt info to your game-server to consume it or request consumeAPI to ToastCloud IAP Server.
'Important' : This API is used to retry transaction. See follow guide : https://docs.toast.com/ko/Game/Gamebase/ko/aos-purchase/#retry-transaction-flow Call this API for retry transaction next situations:
activity | current Activity. |
configuration | sets additional conditions for retrieving results. |
callback | callback pass to API result. |
Example Usage:
PurchasableConfiguration
. com.toast.android.gamebase.base.purchase.PurchasableReceipt
. com.toast.android.gamebase.GamebaseDataCallback
.
|
static |
Request a item list which is purchasable.
This list has items which are registered in both Market(AppStore) and ToastCloud IAP Console.
activity | current Activity. |
callback | callback pass to API result. |
|
static |
Request Purchasing Item registered in the console with the gamebaseProductId.
activity | current Activity. |
gamebaseProductId | registered in the Gamebase console. |
callback | callback pass to API result. |
Example Usage:
|
static |
Request Purchasing Item registered in the console with the gamebaseProductId.
The value entered in the payload can be checked again in the PurchasableReceipt.payload, so it can be used as a method of classifying item payment according to the game server channel and character.
activity | current Activity. |
gamebaseProductId | registered in the Gamebase console. |
payload | used to enter the information you want to check again on the receipt. |
callback | callback pass to API result. |
Example Usage:
|
static |
Request Purchasing Item that has itemSeq.
This is legacy purchase API. We recommend to use the new API Purchase#requestPurchase(Activity, String, GamebaseDataCallback)
.
activity | current Activity. |
itemSeq | represent to item ID. |
callback | callback pass to API result. |
|
static |
'Deprecated API'.
This API is not work anymore.
Processes incomplete purchases. Request a retrying transaction which is not completed to IAP Server
activity | current Activity. |
callback | callback pass to API result. |
|
static |
Request a list of purchased subscription status.
This API will work with Google store.
For the status code, refer to the following document : https://docs.nhncloud.com/en/TOAST/en/toast-sdk/iap-android/#iapsubscriptionstatusstatuscode
Example Usage:
activity | current Activity. |
configuration | sets additional conditions for retrieving results. |
callback | callback pass to API result. |
|
static |
Set the store code of the current app.
storeCode | Input store code. |