Acknowledge Purchase does not work for Android
See original GitHub issueI try to Acknowledge consumable products but it is not working. I’m getting {"acknowledged":false}
response with receipt
I tried two methods according to docs.
v:4.4.8 platform: android device: real device
try {
if (Platform.OS === 'ios') {
RNIap.finishTransactionIOS(purchase.transactionId);
} else if (Platform.OS === 'android') {
// If consumable (can be purchased again)
RNIap.consumePurchaseAndroid(purchase.purchaseToken);
}
} catch (ackErr) {
console.warn('ackErr', ackErr);
}
and
try {
const ackResult = await finishTransaction(purchase, true);
console.log('ackResult', ackResult);
} catch (ackErr) {
console.warn('ackErr', ackErr);
}
Errors:
Possible Unhandled Promise Rejection (id: 1):
Error: Google is indicating that we have some issue connecting to payment.
Error: Google is indicating that we have some issue connecting to payment.
But I can see purchase in my Google Play console and its accepted.
I’m testing my purchases with Google Test Account, and Android docs says:
Test acknowledging purchase with license testers For purchases made by license testers, the acknowledgement window is shorter. Instead of three days, purchases are refunded and revoked if they are not acknowledged within five minutes.
After 5 minutes my purchases there (actually I’m trying for 3-4 hours and all purchases there). There is no problem on Google Play side but some things are not consistent.
{"acknowledged":false}
worries me
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:12 (1 by maintainers)
I’m experiencing the same issue. Purchase is done, I can see it in Publisher Console, but then it gets refunded.
Hi, Although the purchase was completed, it was making a refund and I solved it with the following function.