Interface IPurchaseListener
Listener of a result of purchase or an inventory query.
Namespace: UnityEngine.UDP
Syntax
public interface IPurchaseListener
Methods
OnPurchase(PurchaseInfo)
Called to notify that the purchase has succeeded.
Declaration
void OnPurchase(PurchaseInfo purchaseInfo)
Parameters
Type | Name | Description |
---|---|---|
PurchaseInfo | purchaseInfo |
OnPurchaseConsume(PurchaseInfo)
Called to notify that the consume has succeeded.
Declaration
void OnPurchaseConsume(PurchaseInfo purchaseInfo)
Parameters
Type | Name | Description |
---|---|---|
PurchaseInfo | purchaseInfo |
OnPurchaseConsumeFailed(String, PurchaseInfo)
Called to notify that the consume has failed.
Declaration
void OnPurchaseConsumeFailed(string message, PurchaseInfo purchaseInfo)
Parameters
Type | Name | Description |
---|---|---|
String | message | |
PurchaseInfo | purchaseInfo |
OnPurchaseFailed(String, PurchaseInfo)
Called to notify that the purchase has failed.
Declaration
void OnPurchaseFailed(string message, PurchaseInfo purchaseInfo)
Parameters
Type | Name | Description |
---|---|---|
String | message | |
PurchaseInfo | purchaseInfo |
OnPurchasePending(String, PurchaseInfo)
Called to notify that the purchase is pending.
Declaration
void OnPurchasePending(string message, PurchaseInfo purchaseInfo)
Parameters
Type | Name | Description |
---|---|---|
String | message | |
PurchaseInfo | purchaseInfo |
OnPurchaseRepeated(String)
Called to notify that a player has purchased a non-consumable product several times. You can implement this listener when the partner store doesn’t support QueryInventory.
Declaration
void OnPurchaseRepeated(string productId)
Parameters
Type | Name | Description |
---|---|---|
String | productId |
OnQueryInventory(Inventory)
Called to notify that the query has succeeded.
Declaration
void OnQueryInventory(Inventory inventory)
Parameters
Type | Name | Description |
---|---|---|
Inventory | inventory |
OnQueryInventoryFailed(String)
Called to notify that the query has failed.
Declaration
void OnQueryInventoryFailed(string message)
Parameters
Type | Name | Description |
---|---|---|
String | message |