docs.unity3d.com
    Show / Hide Table of Contents

    Interface IGooglePlayStoreExtensions

    Access GooglePlay store specific functionality.

    Namespace: UnityEngine.Purchasing
    Syntax
    public interface IGooglePlayStoreExtensions : IStoreExtension

    Methods

    ConfirmSubscriptionPriceChange(String, Action<Boolean>)

    Initiate a flow to confirm the change of price for an item subscribed by the user.

    Declaration
    void ConfirmSubscriptionPriceChange(string productId, Action<bool> callback)
    Parameters
    Type Name Description
    String productId

    Product id

    Action<Boolean> callback

    Price changed event finished successfully

    IsPurchasedProductDeferred(Product)

    Determines if the purchase of a product in the Google Play Store is deferred based on its receipt. This indicates if there is an additional step to complete a transaction in between when a user initiates a purchase and when the payment method for the purchase is processed. Handling pending transactions

    Declaration
    bool IsPurchasedProductDeferred(Product product)
    Parameters
    Type Name Description
    Product product

    Product

    Returns
    Type Description
    Boolean

    trueif the input contains a receipt for a deferred or a pending transaction for a Google Play billing purchase, and false otherwise.

    RestoreTransactions(Action<Boolean>)

    Async call to the google store to queryPurchases using all the different support sku types.

    Declaration
    void RestoreTransactions(Action<bool> callback)
    Parameters
    Type Name Description
    Action<Boolean> callback

    Will be called as often as many purchases the queryPurchases finds. (the IStoreCallback will be called as well)

    UpgradeDowngradeSubscription(String, String)

    Upgrade or downgrade subscriptions, with proration mode IMMEDIATE_WITHOUT_PRORATION by default See more

    Declaration
    void UpgradeDowngradeSubscription(string oldSku, string newSku)
    Parameters
    Type Name Description
    String oldSku

    current subscription

    String newSku

    new subscription to subscribe

    UpgradeDowngradeSubscription(String, String, Int32)

    Upgrade or downgrade subscriptions

    Declaration
    void UpgradeDowngradeSubscription(string oldSku, string newSku, int desiredProrationMode)
    Parameters
    Type Name Description
    String oldSku

    current subscription

    String newSku

    new subscription to subscribe

    Int32 desiredProrationMode

    Specifies the mode of proration. See more

    UpgradeDowngradeSubscription(String, String, GooglePlayProrationMode)

    Upgrade or downgrade subscriptions

    Declaration
    void UpgradeDowngradeSubscription(string oldSku, string newSku, GooglePlayProrationMode desiredProrationMode)
    Parameters
    Type Name Description
    String oldSku

    current subscription

    String newSku

    new subscription to subscribe

    GooglePlayProrationMode desiredProrationMode

    Specifies the mode of proration. See more

    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