Replies: 1 comment
-
|
Why?The Google Play Billing library now handles failed purchases automatically with improved reconnection logic. Manual flushing is no longer necessary. MigrationBefore (v11/v12/v13)import { flushFailedPurchasesCachedAsPendingAndroid } from 'react-native-iap';
if (Platform.OS === 'android') {
await flushFailedPurchasesCachedAsPendingAndroid();
}After (v14+)// Not needed - billing client handles this automatically
// Just use getAvailablePurchases() to restore pending purchases if needed
import { getAvailablePurchases } from 'react-native-iap';
const purchases = await getAvailablePurchases();NoteYou mentioned migrating to v11, but v11/v12/v13 are no longer supported. Please migrate directly to v14+: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm migrating to 11 and the migration guide says that now, we must import platform-exclusive methods through 'IapAndroid', 'IapAmazon', 'IapIos' or 'IapIosSk2', giving the example of 'IapAndroid.validateReceiptAndroid' (https://react-native-iap.dooboolab.com/docs/migrate_to_11.0.0).
But the documentation about 'validateReceiptAndroid' still imports it from 'react-native-iap' (https://react-native-iap.dooboolab.com/docs/api-reference/methods/android/validate-receipt-android).
In my case, the only exclusive method seems to be 'flushFailedPurchasesCachedAsPendingAndroid', but if I try to import it through 'IapAndroid', I have a type error.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions