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
Supporting "Custom" configuration for <CartProvider /> #264
Comments
Given we are removing stripe most people will need a way to do some form of gathering customer info and maybe using a different payment gateway. Besides currency we should add a prop called checkoutUrl. Let´s add the useCustomProps hook once we have a basic CartProvider working without stripe. |
Sounds good! Do you want me to assign this to you btw? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
Not all countries are able to use Stripe, however, users would like to take advantage of the shopping cart state and logic that USC provides. Right now, there are Stripe values that are required in the current set up.
Goal
It would be ideal to pass a "custom" prop to the CartProvider that makes it so that no config is required at all.
Approach
As of right now, there is a ClientOnly config and a CustomCheckout config. They each share a "Common Config" which is where the Stripe values are required:
use-shopping-cart/use-shopping-cart/core/index.d.ts
Line 50 in c08f1a9
We would need a "CustomConfig" that requires only one prop:
currency
It's needed for adding items to the cart and creating total values for display. I don't think it would be a good idea to leave currency out of it.
Possibilities
Perhaps users may want to take advantage of using props that DO get passed to the CartProvider. Was wondering if it would be a good idea to make a
useCustomProps
hook to do this.Providing Feedback
Feel free to comment here with any issues/concerns!
The text was updated successfully, but these errors were encountered: