[Android] acknowledgePurchaseAndroid() Google is indicating that we have some issue connecting to payment.
See original GitHub issueVersion of react-native-iap > 3.4.12
Version of react-native > 0.58.3
Platforms you faced the error > Android
Actual behavior
I have got a
Google is indicating that we have some issue connecting to payment. error
In logcat I get a E/DoobooUtils: Error Code : 5
I was using version 2.5.5 previously, it was working fine. The only thing not working there is the acknowledgePurchaseAndroid call
Tested environment > Real Device
Here is my code :
handleServerSubscribe = async purchase => {
const {
productId,
transactionReceipt,
} = purchase
if (transactionReceipt) {
try {
// FIXME it fails right here
await acknowledgePurchaseAndroid(purchase.purchaseToken)
} catch (e) {
console.log('subscription error ', e)
}
}
}
componentDidMount() {
this.purchaseUpdateSubscription = purchaseUpdatedListener(purchase => {
this.handleServerSubscribe(purchase)
})
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:35 (7 by maintainers)
Top Results From Across the Web
Error: Google is indicating that we have some issue ...
Error : Google is indicating that we have some issue connecting to payment. #1501 ... I checked all issues related to this issue,...
Read more >Is it normal to get this error while testing in app purchases for ...
I am not sure if this appears only in test iap and will be solved when using real purchases. the iap code is:...
Read more >flutter_inapp_purchase | Flutter Package - Pub.dev
End billing connection. consumeAllItems, String, Manually consume all items in android. Do NOT call if you have any non-consumables (one time purchase ...
Read more >react-native-iap - npm
Acknowledge a purchase when you have delivered it to your user by calling acknowledgePurchaseAndroid() . On iOS non-consumable purchases are ...
Read more >BillingClient.BillingResponseCode - Android Developers
A user billing error occurred during processing. ... The app is not connected to the Play Store service via the Google Play Billing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got it working: I just made these specific lines for Android, but the need to do so was not very apparent from the documentation. Now it works both on Android and iOS:
// on Android we need to acknowledge purchase or finishTransaction fails// if we do not acknowledge, purchase will roll back in 5 minRNIap.acknowledgePurchaseAndroid(purchase.purchaseToken).then(() => {RNIap.finishTransaction(purchase, true).catch(err => {console.log(err.code, err.message);});});I’m getting the same error with
RNIap.finishTransaction