我正在我的游戏中集成 InApp 购买(使用 cocos creator 构建)。但无法在 Android 和 Facebook.com 上的 FBInstant.getSupportedAPIs() 中获取 payment.purchaseAsync 以下任何帮助是我的示例代码。
let supportedAPIs = FBInstant.getSupportedAPIs();
if(supportedAPIs.includes('payments.purchaseAsync'))
{
console.log('payments supported...');
FBInstant.payments.onReady(() => {
console.log('payments ready...');
FBInstant.payments.purchaseAsync({
productID: 'com.test.testing',
developerPayload: '',
}).then(function (purchase) {
console.log(purchase);
});
});
}
else
{
console.log('payments not supported...');
}