chirag04 / react-native-in-app-utils

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

Send "user_cancelled" error #120

Open RalfNieuwenhuizen opened 7 years ago

RalfNieuwenhuizen commented 7 years ago

Send "user_cancelled" error instead of "Cannot connect to iTunes Store" upon cancellation

raduflp commented 6 years ago

@chirag04 could you have a look at this and maybe merge it? in my case it solves the issue of app crashing when user cancels a purchase

chirag04 commented 6 years ago

you this logic live in JS and in your product? regardless, you would have a if to check if user_cancelled. so might as well check for transaction code?

raduflp commented 6 years ago

in my case for the user canceled scenario I could not capture a response or error in the JS jogic, even when surrounding the statements with try catch. It would always silently throw the error on the native side and crash the app.

Maybe someone else could test this scenario and share their experience

chirag04 commented 6 years ago

i'm guessing you are hit by this one: https://github.com/chirag04/react-native-in-app-utils/pull/109

can you confirm the native error?

gontovnik commented 6 years ago

@raduflp, @chirag04 any update on this? I need this change to be merged. Currently, there is no way to identify whether the transaction really failed or was canceled by the user.

soheilpro commented 5 years ago

Any plans to merge this?

I need to know whether the transaction was canceled by the user or there was an error.

nztf commented 5 years ago

+1 to this feature request Now I'm using fork with this PR