docs.unity3d.com
    Show / Hide Table of Contents

    Interface IStoreController

    Used by Applications to control Unity Purchasing.

    Namespace: UnityEngine.Purchasing
    Syntax
    public interface IStoreController

    Properties

    products

    Gets the collection of products in the store.

    Declaration
    ProductCollection products { get; }
    Property Value
    Type Description
    ProductCollection

    The product collection.

    Methods

    ConfirmPendingPurchase(Product)

    Where an Application returned ProcessingResult.Pending from IStoreListener.ProcessPurchase(), Applications should call this method when processing completes.

    Declaration
    void ConfirmPendingPurchase(Product product)
    Parameters
    Type Name Description
    Product product

    The product for which its pending purchase it to be confirmed.

    FetchAdditionalProducts(HashSet<ProductDefinition>, Action, Action<InitializationFailureReason>)

    Fetch additional products from the controlled store.

    Declaration
    void FetchAdditionalProducts(HashSet<ProductDefinition> additionalProducts, Action successCallback, Action<InitializationFailureReason> failCallback)
    Parameters
    Type Name Description
    HashSet<ProductDefinition> additionalProducts

    The set of product definitions to be fetched.

    Action successCallback

    The event triggered on a successful fetch.

    Action<InitializationFailureReason> failCallback

    The event triggered on a failed fetch.

    InitiatePurchase(String)

    Initiate a purchase from the controlled store

    Declaration
    void InitiatePurchase(string productId)
    Parameters
    Type Name Description
    String productId

    The id of the product to be purchased.

    InitiatePurchase(String, String)

    Initiate a purchase from the controlled store.

    Declaration
    void InitiatePurchase(string productId, string payload)
    Parameters
    Type Name Description
    String productId

    The id of the product to be purchased.

    String payload

    The developer payload provided for certain stores that define such a concept (ex: Google Play).

    InitiatePurchase(Product)

    Initiate a purchase from the controlled store.

    Declaration
    void InitiatePurchase(Product product)
    Parameters
    Type Name Description
    Product product

    The product to be purchased.

    InitiatePurchase(Product, String)

    Initiate a purchase from the controlled store.

    Declaration
    void InitiatePurchase(Product product, string payload)
    Parameters
    Type Name Description
    Product product

    The product to be purchased.

    String payload

    The developer payload provided for certain stores that define such a concept (ex: Google Play).

    Back to top
    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