shoutem / react-native-shopify

React Native bridge to Shopify Buy SDK
262 stars 42 forks source link

Error when creating checkout with the same product for the second time #23

Open webmaster100 opened 7 years ago

webmaster100 commented 7 years ago

Hello! I am using webCheckout and encountered an error when calling this method for the second time.
I call webCheckout first time, it open the WebView, then I press Done button to return back and create webCheckout again. This error occurs, but not every time: image And after several minutes, the checkout page can be opened without errors It seems this is related to this issue with reservation of products https://github.com/Shopify/mobile-buy-sdk-ios/issues/102 Is there a way to minimize the reservation time for products or remove products from reservations using this method removeProductReservationsFromCheckout? Can you suggest how to solve this

Thanks!

Air-Miha commented 7 years ago

Hi @webmaster100,

We still need to implement callback handling for web checkouts. Then you'd be able to clear the cart and prevent the user from accidentally creating a second checkout. Take a look at this thread:

https://github.com/shoutem/react-native-shopify/issues/13

Would you be willing to tackle this and send a PR?

webmaster100 commented 7 years ago

HI, Air-Miha,

I would tackle this, but I am not familiar with Objective-C, only JavaScript.