docs.unity3d.com
    Show / Hide Table of Contents

    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

    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.

    Extension Methods

    StoreCallbackExtensionMethods.FindProductById(IStoreCallback, String)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023