-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow products to be fetched even if purchases are restricted #123
Conversation
i guess this is fine but at the same time we should update the purchaseProduct calls to check if they can make payments. |
It will error out both ways, so doesn't really make a difference in result. |
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. |
Fair enough, let me make that change. |
i think it's a reasonable pattern to ask for users to check first. so let's just update the docs only. |
Added README changes |
Readme.md
Outdated
### Checking if payments are allowed | ||
|
||
```javascript | ||
InAppUtils.canMakePayments((canMakePayments, error) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️ Oops...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
c553547
to
c51d6d8
Compare
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. Update README to include canMakePayments Also add note about calling canMakePayments before purchaseProduct to show a better error message to users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will ship tomorrow.
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.