Version: 2021.3
Language : English
Browsing Product Metadata
Processing Purchases

Initiating Purchases

When the user wants to buy a product call the InitiatePurchase method of the IStoreController, identifying the product the user wants to buy.

// Example method called when the user presses a 'buy' button
// to start the purchase process.
public void OnPurchaseClicked(string productId) {
    controller.InitiatePurchase(productId);
}

Your application will be notified asynchronously of the result, either with an invocation of ProcessPurchase for successful purchases or OnPurchaseFailed for failures.

Browsing Product Metadata
Processing Purchases
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961