fix(#45): Re-add email

This commit is contained in:
Josh Creek
2024-10-22 19:16:09 +01:00
parent 570b11ef2a
commit a33779ce53
+3
View File
@@ -50,6 +50,9 @@ export const POST: RequestHandler = async ({ request, cookies, locals: { safeGet
if (stripeCustomerId) {
// If the user has a Stripe customer ID, attach it to the checkout session
stripeCheckoutSessionObject.customer = stripeCustomerId;
} else {
// If the user doesn't have a Stripe customer ID, create a new customer with their email
stripeCheckoutSessionObject.customer_email = userEmail;
}
// Create a subscription checkout session with Stripe