chirag04 / react-native-in-app-utils

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

Handle a user cancelling a purchase #104

Closed ryancoughlin closed 2 years ago

ryancoughlin commented 7 years ago

Overview

Starting to work on gracefully handling when a user wants to cancel a purchase. This happens when they hit "Cancel" on the alert before buying.

Rusty with my Obj C, would love some pointers / guidance. The callback does log appropriately:

Current state of PR

When you tap "Cancel' the error below occurs. The callback is logged correctly:

2017-07-14 15:22:13.997 [info][tid:com.facebook.React.JavaScript] user_cancelled

img_0417

ryancoughlin commented 7 years ago

Circling back here, thanks for the early feedback. Its been years since I worked within Obj C so I may not be able to get this finished, but I am willing to push it as far as I can.

ryancoughlin commented 7 years ago

And in case it is related to these changes. Below is what I am getting when my products attempt to load:

Error Domain=NSURLErrorDomain Code=-999 "Cannot connect to iTunes Store" UserInfo={NSErrorFailingURLStringKey=https://sandbox.itunes.apple.com/WebObjects/MZInit.woa/wa/initiateSession?ix=6&os=10&locale=en_US, NSLocalizedDescription=Cannot connect to iTunes Store, NSErrorFailingURLKey=https://sandbox.itunes.apple.com/WebObjects/MZInit.woa/wa/initiateSession?ix=6&os=10&locale=en_US}

Building to my device and have removed the app and signed out of the App Store several times.

ryancoughlin commented 7 years ago

@chirag04 Would you be interested in taking a look at this? Not very strong with Obj C and would love to get this resolved to ship this app.