We are trying to integrate facebook instant game IAP in our game,but it only works on Browser.
There is a dialog presented on browser. payment dialog on browser
But on Android device, the callback passed to FBInstant.payments.onReady
is never called.
Sample Code we are using:
let supportedAPIs = 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: 'payload',
}).then(function (purchase) {
console.log(purchase);
});
});
}
else
{
console.log('payments not supported...');
}
Is there any extra requirement I need to fulfill before I could test payment on Android device?
My test device model is Nexus 6P, and Android version is 8.0.