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

Netlify Frontend for sample app #5

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

Conversation

IslandRhythms
Copy link
Contributor

Includes route, test, and model updates

@IslandRhythms IslandRhythms changed the title Netlify Frontend for sampel app Netlify Frontend for sample app Jul 27, 2022
netlify-functions-ecommerce/.config/development.js Outdated Show resolved Hide resolved
netlify-functions-ecommerce/frontend/Cart/cart.js Outdated Show resolved Hide resolved
netlify-functions-ecommerce/netlify/functions/addToCart.js Outdated Show resolved Hide resolved

const handler = async(event) => {
try {
event.body = JSON.parse(event.body || {});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to do anything to configure Stripe to use this endpoint? Just want to know for readme purposes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to do anything to configure Stripe to use this endpoint? Just want to know for readme purposes

Well currently, when checkout is completed, on the success page it fires an api request to create the order. I'm sure that you could set up a webhook so that the user wouldn't have to wait for the success page and instead the webhook would trigger this route.

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.

2 participants