store.purchase()

类型 函数
返回值
修订版 发行版 2024.3703
关键字 Apple、IAP、应用内购买、购买
另请参阅 store.canMakePurchases
store.init()
store.*

概述

通过向商店发送购买请求,在提供的产品上发起购买交易,然后向 store.init() 中定义的侦听器发送 storeTransaction 事件。

语法

store.purchase( productIdentifiers )
productIdentifiers (必需)

字符串表格单个字符串或字符串数组(表格),其中每个字符串表示要购买的项目的商品标识符。