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

Adding Shipping Calculation based on Stripe Address Form #114

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JDLanctot
Copy link
Contributor

A few notes about this PR:

  1. The updated shipping price and total are reflected in the UI but not the stripe PaymentIntent. This is still a TODO.
  2. A new file called checkout-content.tsx was created to have some allow for "use client" for the majority of the checkout components. This probably should eventually become a shell, but as there was already a checkout-shell deeper in the checkout structure I didn't want to create a second shell to confuse things.
  3. The next.config.js had to be updated because without the changes, there is some sort of hexoid error (which likely has to do with the dependencies introduced with EasyPost).
  4. Getting shipping rates is handled with a server action when the switch for confirming the address is toggled, which makes it so that the Pay button is no longer disabled and shipping rates are rendered. Changing the shipping address resets the confirm switch so that shipping must be recalculated on the next switch toggle.
  5. Currently using the lowest shipping rate, but this can be changed if required.

Copy link

vercel bot commented Jan 16, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @sadmann7 on Vercel.

@sadmann7 first needs to authorize it.

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

Successfully merging this pull request may close these issues.

None yet

1 participant