Interface IStoreCallback
Callback interface for IStores.
Namespace: UnityEngine.Purchasing.Extension
Syntax
public interface IStoreCallback
Properties
products
For querying product information.
Declaration
ProductCollection products { get; }
Property Value
Type | Description |
---|---|
ProductCollection |
useTransactionLog
Stores may opt to disable Unity IAP's transaction log if they offer a robust transaction system of their own (e.g. Apple).
The default value is 'true'.
Declaration
bool useTransactionLog { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
OnAllPurchasesRetrieved(List<Product>)
Inform Unity Purchasing of all active purchases.
Declaration
void OnAllPurchasesRetrieved(List<Product> purchasedProducts)
Parameters
Type | Name | Description |
---|---|---|
List<Product> | purchasedProducts | all active purchased products |
OnProductsRetrieved(List<ProductDescription>)
Complete setup by providing a list of available products, complete with metadata and any associated purchase receipts and transaction IDs.
Any previously unseen purchases will be completed by the PurchasingManager.
Declaration
void OnProductsRetrieved(List<ProductDescription> products)
Parameters
Type | Name | Description |
---|---|---|
List<ProductDescription> | products | The list of product descriptions retrieved. |
OnPurchaseFailed(PurchaseFailureDescription)
Notify a failed purchase with associated details.
Declaration
void OnPurchaseFailed(PurchaseFailureDescription desc)
Parameters
Type | Name | Description |
---|---|---|
PurchaseFailureDescription | desc | The object detailing the purchase failure |
OnPurchasesRetrieved(List<Product>)
DEPRECATED - Inform Unity Purchasing of all active purchases.
Declaration
[Obsolete("OnPurchasesRetrieved is deprecated, please use OnAllPurchasesRetrieved instead.")]
void OnPurchasesRetrieved(List<Product> purchasedProducts)
Parameters
Type | Name | Description |
---|---|---|
List<Product> | purchasedProducts | all active purchased products |
OnPurchaseSucceeded(String, String, String)
Inform Unity Purchasing of a purchase.
Declaration
void OnPurchaseSucceeded(string storeSpecificId, string receipt, string transactionIdentifier)
Parameters
Type | Name | Description |
---|---|---|
String | storeSpecificId | The product id specific to the store it was purchased from. |
String | receipt | The receipt provided by the store detailing the purchase |
String | transactionIdentifier | The id of the transaction |
OnSetupFailed(InitializationFailureReason)
Purhasing unavailable.
Declaration
void OnSetupFailed(InitializationFailureReason reason)
Parameters
Type | Name | Description |
---|---|---|
InitializationFailureReason | reason | The reason the initialization failed. |