如何在Facebook即时游戏中测试付款?

时间:2018-06-18 11:31:06

标签: facebook facebook-instant-games facebook-payments

我似乎无法显示测试对话框。当我调用payments.purchaseAync时,我总是会看到一个真正的Checkout对话框而不是测试对话框。

enter image description here

我已经将测试用户添加到测试人员。我错过了什么吗?或者目前还不支持此功能?

enter image description here

我正在使用的临时代码:

let supportedAPIs:any = FBInstant.getSupportedAPIs();
if(supportedAPIs.includes('payments.purchaseAsync'))
{
    console.log('payments supported...');

    FBInstant.payments.onReady(() => {
        console.log('payments ready...');

        FBInstant.payments.purchaseAsync({
            productID: 'test_product',
            developerPayload: 'foobar',
        }).then(function (purchase) {
            console.log(purchase);
        });
    });
}
else
{
    console.log('payments not supported...');
}

0 个答案:

没有答案