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

Delayed consumable purchase notification #63

Closed ggunti closed 3 years ago

ggunti commented 3 years ago

Let's say I have a "consumable" product. In test mode (android), if I buy it with a "Slow test card, declines after a few minutes" or "Slow test card, approves after a few minutes" (please check the image), both of them returns err.code equal to 'deferred_payment'. So, later, when the purchase is approved / declined, how can I get a notification about it in my app?

Now, talking about production mode, if user uses a "Slow card" to buy a "consumable" product, I will get 'deferred_payment' as error code, but later, after the purchase is accepted / declined, how can I get a notification about it in the app? (let's say I do not use webhooks)

Thanks!

Screenshot_2021-02-11-11-40-57-238_com android vending

iaphub commented 3 years ago

Hi @ggunti, The only way would be with webhooks. If you're selling consumables the way to go is to use webhooks, handling your consumables on the client isn't safe.