Gamebase SDK for Unity 2.75.0 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ RequestItemListAtIAPConsole()

static void RequestItemListAtIAPConsole | ( | GamebaseCallback::GamebaseDelegate< List< GamebaseResponse::Purchase::PurchasableItem > > | callback | ) |
| static

Request a item list which is purchasable.

This list has items which are only registered in ToastCloud IAP Console, not Market(Google, TStore)

Since
  Added 1.4.0.

Parameters

  callback | Callback pass to API result.

Example Usage :

public void RequestItemListAtIAPConsoleSample()
{
Gamebase.Purchase.RequestItemListAtIAPConsole((purchasableItemList, error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
Debug.Log("RequestItemListAtIAPConsole succeeded");
foreach (GamebaseResponse.Purchase.PurchasableItem purchasableItem in purchasableItemList)
{
var message = new StringBuilder();
message.AppendLine(string.Format("itemSeq:{0}", purchasableItem.itemSeq));
message.AppendLine(string.Format("price:{0}", purchasableItem.price));
message.AppendLine(string.Format("currency:{0}", purchasableItem.currency));
message.AppendLine(string.Format("itemName:{0}", purchasableItem.itemName));
message.AppendLine(string.Format("marketItemId:{0}", purchasableItem.marketItemId));
Debug.Log(message);
}
}
else
{
// Check the error code and handle the error appropriately.
Debug.Log(string.Format("RequestItemListAtIAPConsole failed. error is {0}", error));
}
});
}
Toast.Gamebase.Gamebase.Purchase.RequestItemListAtIAPConsole
static void RequestItemListAtIAPConsole(GamebaseCallback.GamebaseDelegate< List< GamebaseResponse.Purchase.PurchasableItem > > callback)
Request a item list which is purchasable.
Definition: Gamebase.cs:2372
Toast.Gamebase.Gamebase.Purchase
The Purchase class provides several APIs related to purchasing processes.
Definition: Gamebase.cs:2069
Toast.Gamebase.Gamebase.IsSuccess
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition: Gamebase.cs:57
Toast.Gamebase.Gamebase
The Gamebase class is core of Gamebase service.
Definition: Gamebase.cs:11