chirag04 / react-native-in-app-utils

A react-native wrapper for handling in-app payments
MIT License
890 stars 185 forks source link

Allow products to be fetched even if purchases are restricted #123

Closed akshetpandey closed 6 years ago

akshetpandey commented 6 years ago

Restricting IAPs doesn't prevent us from fetching product information. A better way to handle this is to check canMakePayments method and show appropriate message on the payment screen.

chirag04 commented 6 years ago

i guess this is fine but at the same time we should update the purchaseProduct calls to check if they can make payments.

akshetpandey commented 6 years ago

It will error out both ways, so doesn't really make a difference in result.

chirag04 commented 6 years ago

difference being you will get a clear "not_available" error callback to handle it in the js. at the very least we should call out in the docs for buy products to check for payments before making a purchaseProduct request.

akshetpandey commented 6 years ago

Fair enough, let me make that change.

chirag04 commented 6 years ago

i think it's a reasonable pattern to ask for users to check first. so let's just update the docs only.

akshetpandey commented 6 years ago

Added README changes