Version: 6000.3
语言: 中文
浏览产品元数据
处理购买

发起购买

当用户想要购买产品时,调用InitiatePurchase方法IStoreController,识别用户想要购买的产品。

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

应用程序将异步收到结果通知,调用ProcessPurchase成功购买或OnPurchaseFailed对于失败。

浏览产品元数据
处理购买