diff --git a/README.md b/README.md index 4bc22dc..95e6717 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,5 @@ In its current configuration, the application can be easily linked to Netlify vi ## To Do -- Style product page - Enable proper pagination for the products page - Get a proper checkout page with data from Stripe rather than re-using the old basket object diff --git a/src/routes/api/checkout/+server.ts b/src/routes/api/checkout/+server.ts index ff12fa0..8b6c306 100644 --- a/src/routes/api/checkout/+server.ts +++ b/src/routes/api/checkout/+server.ts @@ -26,5 +26,8 @@ export const POST: RequestHandler = async ({ request }) => { cancel_url: `${request.headers.get('origin')}/checkout/cancelled` }); + // TODO - Store the checkout session.id for access from the frontend + // https://docs.stripe.com/api/checkout/sessions/retrieve + return redirect(303, session.url as string); };