[Android] Getting "purchase is not suitable to be purchased"
See original GitHub issueRN: 0.61.5
RNIap: 4.4.3
Platform: Android
Expected: calling finishTransaction
succeeds
Actual: finishTransaction
fails with “purchase is not suitable to be purchased”
Test env: real device
I’m integrating RNIap into a new app (so no real-world experiences yet) in order to purchase a non-consumable product. The iOS part works fine, but on Android I recently started to consistently get the error “purchase is not suitable to be purchased” when calling RNIap.finishTransaction
.
Looking at the code, this indicates that my purchase is not considered to be purchased (!purchase.isAcknowledgedAndroid && purchase.purchaseStateAndroid === PurchaseStateAndroid.PURCHASED
is false
).
I’m pretty sure that my general setup (product id, native app configuration, etc.) is correct because a) the process works on iOS and b) it also used to work on Android until recently.
Some additional background: when starting the app in test mode I try to clean up any leftover data by following resolve unacknowledged purchase and consume owned items to avoid “already owned” error. Disabling those calls did not make a difference though.
Anyone has a hint what might be wrong in my setup?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
@haikov sorry, but my “fix” is for sure not applicable to you. I have a helper function which converts the purchase JSON data which I receive from RNIap to something our backend can digest, and in this function I accidentally forgot to copy some Android-specific data fields.
https://github.com/dooboolab/react-native-iap/issues/1092