Skip to content
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

why not use JS-Buy-SDK #29

Open
thisisjaiswal opened this issue Dec 3, 2017 · 8 comments
Open

why not use JS-Buy-SDK #29

thisisjaiswal opened this issue Dec 3, 2017 · 8 comments

Comments

@thisisjaiswal
Copy link

Shopify API is graphql api, Android/iOS SDKs connects to this api through HTTP calls, then why not directly use JS-Buy-SDK when you are on JS App, instead of creating a double wrapper on the native SDK.
React Native shouldn't be a wrapper of every native thing, but mainly the UI, everything else is better handled in JS side.

@ericlewis
Copy link

I wondered this too, the JS SDK doesn’t support anywhere near as many things, such as customer login etc.

@ericlewis
Copy link

ericlewis commented Dec 4, 2017 via email

@jgrancher
Copy link
Contributor

Hey @ericlewis! I'm just curious to see your thoughts here. Could you provide us with more information about the differences between the JS Buy SDK and this bridge? I'm keen to know in which circonstances I'd have to use the former or the latter, as my goal is to build a storefront (mobile app) for an existing store (but so far I don't require customer login).

@isaachinman
Copy link

isaachinman commented May 11, 2018

@ericlewis @jgrancher I've just come across this a few months later and am in the decision-making process myself. My thoughts:

It seems like the end goal of the JavaScript Buy SDK is to produce a Shopify checkout URL, to which you then redirect the user for the checkout process. Meaning, the JavaScript Buy SDK is not really a "buying" SDK, but more of a "cart" SDK, at the end of which you redirect to Shopify anyways. Despite the maintainers insisting it supports Node environments, it seems like an inherently web-centric lib. If you want a way to actually process orders programmatically, you'll need something else.

A question for anyone familiar with this lib: does this bridge simply wrap the entire functionality of the Mobile Buy SDKs, or is it a small subset of that intended solely for CC-based checkouts?

@naiduasn
Copy link

naiduasn commented Aug 1, 2018

@isaachinman i am at the same place right now. So what did you choose? Any learnings on what should we use for native checkout experience?

@isaachinman
Copy link

isaachinman commented Aug 2, 2018

@naiduasn After wasting a huge amount of time trying to piece together a working solution with Shopify's various APIs, I ultimately arrived at the conclusion that it's not presently possible if you also need to support discount codes via Shopify.

The solution I ended up with is: handle payments manually via Stripe (if you're on RN, tipsi-stripe is great), and then create Shopify orders via either of the Admin APIs server side after payment is successful. You lose cart/checkout/abandon functionality entirely. Also, you'll have to write some methods to fetch discount codes, because Shopify paginates them. There are a lot of small, annoying gotchas in the process.

All in all, working with Shopify has been an absolutely terrible developer experience. They do not offer any technical support whatsoever and the developer forum is basically ignored. The API docs are shambolic and took me days to fully understand.

I would strongly recommend you find a different solution, but if you absolutely need to integrate Shopify into a mobile app, be prepared to spend quite some time, and make many compromises.

@amie-wilt
Copy link

amie-wilt commented Oct 1, 2019

I can confirm that what @isaachinman described still stands true.

I found this comment in the early stages of embarking on this extremely frustrating journey (custom Shopify checkout) and ultimately moved away from the idea of a custom checkout and went with the webUrl option. However, after realizing there was no way of persisting the user session into the checkout flow (the user has to log in again at checkout unless you're using ShopifyPlus which is a minimum ~$2k/month), I went back to the idea of a custom checkout and decided to try and piece it together with the admin api and tipsi-stripe, just as @isaachinman described. I just hit the wall of discount codes.. which is when his comment came flashing back to me. So I went digging for it, and sure enough, my experience is exactly as he said. I'm quite frustrated with myself for getting lost in the process and forgetting about this post. Again, as @isaachinman said, we've spent a huge amount of time on this.

I will say it seems the developer forum does get more attention than maybe it did in the past, but the docs are definitely still "shambolic" (great word btw).

If you're not already locked into Shopify, I recommend looking into something with a friendlier headless approach.

@arecastudio
Copy link

At the end, js-buy-sdk is just an API to create draft cart, you will need to open an url which redirect user to web version to finish the order process. I use an approach by store user data in firebase, and ask the delivery address every time they are doing checkout session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants