react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

[Android] getAvailablePurchases doesn't return failed purchase

Open luongminh2410-fabbi opened this issue 8 months ago • 1 comments

Please use the Discussion board if you want to get some help. Please use issues to report bugs.

Description I want to use getAvailablePurchases to restore purchases on Android.

However, I’ve encountered two issues depending on the state of the purchase:

  • If the Google Play payment process is interrupted before the green checkmark (successful purchase) is shown in the popup (purchase was created and i can check it on play store) → getAvailablePurchases does not return any data related to the pending/failed purchase.

  • If the payment is marked as successful in the popup (green checkmark), but then an error occurs afterward → getAvailablePurchases does return the data for this failed purchase.

Expected Behavior

getAvailablePurchases return pending/failed purchase

Screenshots

Image

Environment:

  • react-native-iap: 12.15.1
  • react-native: 0.70.6
  • Platforms (iOS, Android, emulator, simulator, device): Android

To Reproduce Steps to reproduce the behavior:

  1. Request subscription
  2. Select a payment method
  3. While the purchase is being processed, turn on airplane mode before the green success checkmark appears.
  4. After a few seconds, the Google Play popup shows “Purchase failed.”
  5. Reopen the app and call getAvailablePurchases → doesn't returns failed purchase in array.

[Optional] Additional Context

luongminh2410-fabbi avatar Jun 16 '25 03:06 luongminh2410-fabbi

Please try 14.+ and come back since you've used old unmaintained library.

hyochan avatar Sep 30 '25 03:09 hyochan