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

Extra option for redirectToCheckout #104

Closed
dayhaysoos opened this issue May 16, 2020 · 3 comments · Fixed by #105 or #267
Closed

Extra option for redirectToCheckout #104

dayhaysoos opened this issue May 16, 2020 · 3 comments · Fixed by #105 or #267

Comments

@dayhaysoos
Copy link
Owner

I've come across someone who doesn't actually need the shopping cart, but needs the checkout from a single click of an item.

I propose that we give an option to pass a sku object to redirect to checkout.

If the sku property is passed, it immediately calls Stripe's redirect to checkout with that one product formatted the way it needs to be in line_items

What do you think @ChrisBrownie55 ?

I actually kinda need this for a site today so I'm going to get started, if you have any objections or a more reasonable approach please let me know

@dayhaysoos
Copy link
Owner Author

OR!

Do we think this should be a separate function specifically for instant checkout on click? Don't want to make redirectToCheckout too weird, ya know?

@andria-dev
Copy link
Collaborator

I think this should be a separate function as it should just be a call to addItem and then a call to redirectToCheckout

@dayhaysoos
Copy link
Owner Author

@ChrisBrownie55 my only concern with this is that addCart is tied to local storage and would probably persist even after checkout. I'm thinking of making it a separate function that totally operates without the local storage functions under the hood.

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