iaphub / react-native-iaphub

The easiest way to implement IAP (In-app purchase) in your React Native app.
https://www.iaphub.com/
MIT License
319 stars 21 forks source link

How can I test the purchase multiple times in development? #87

Closed ramos-lucas closed 3 years ago

ramos-lucas commented 3 years ago

When I was just using react-native-iap, I was able to buy the same product multiple times (with a warning).

Now I'm using this package and get an error when purchasing again the same product. What's the best way to buy a product multiple times without having to change my username every time?

iaphub commented 3 years ago

Hi @ramos-lucas , What kind of product are you selling? (subscription, consumable, non-consumable...)

ramos-lucas commented 3 years ago

Non-consumable

ramos-lucas commented 3 years ago

Actually, I can't buy again on the same device even changing the user. Must be because of the registered Sandbox account, right? Is there any way I could avoid this behavior?

iaphub commented 3 years ago

Hi @ramos-lucas, A non-consumable in tied to the account for life and it's unfortunately a pain to test indeed... You could indeed use a different sandbox account on the phone (and use a different user id). Another possibility would be to use a consumable to test your implementation, you can buy a consumable multiple times which makes testing way easier. (if IAPHUB can process a receipt with a consumable, it'll also work with a non-consumable).

pisacode commented 1 year ago

How can we consume a consumable product on Android? @iaphub I am getting an error as you already purchased this product for consumables.