Replies: 2 comments
-
|
I'm having the same error but there is a comment on this link [/issues/1006] stating that acknowledgment is not necessary depending on the second parameter, which is whether the item is consumable or not. However, upon following the statement:
It gave me this error: E_SERVICE_ERROR The service is unreachable. This may be your internet connection, or the Play Store may be down. I hope someone can help. TIA! Environment: |
Beta Was this translation helpful? Give feedback.
-
This API No Longer Exists in v14+
You are using v12.x which is no longer supported. Migration to v14+In v14+, use import { useIAP } from 'react-native-iap';
const { finishTransaction } = useIAP({
onPurchaseSuccess: async (purchase) => {
// Validate purchase on your server first, then finish
await finishTransaction({
purchase,
isConsumable: false, // true for consumables
});
},
});Or using the root API: import { finishTransaction, purchaseUpdatedListener } from 'react-native-iap';
purchaseUpdatedListener(async (purchase) => {
if (purchase.transactionReceipt) {
// finishTransaction handles acknowledgment internally
await finishTransaction({
purchase,
isConsumable: false,
});
}
});About E_SERVICE_ERRORThe "service is unreachable" error typically indicates:
Please UpgradeVersions below v14 are no longer supported. Use at your own risk. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When we purchase subscription and call
await acknowledgePurchaseAndroid(token), I am getting the error shown in the attached screenshot. I printed the token variable and it is giving me the token but it is not getting acknowledged.Expected Behavior
N/A
Screenshots
Environment:
react-native-iap: 12.13.1
react-native: 0.72.5
Platforms (iOS, Android, emulator, simulator, device)
Beta Was this translation helpful? Give feedback.
All reactions