mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-14 19:43:55 +00:00
fix(#45): Remove customer creation from subscription checkout mode
This commit is contained in:
@@ -50,10 +50,6 @@ export const POST: RequestHandler = async ({ request, cookies, locals: { safeGet
|
|||||||
if (stripeCustomerId) {
|
if (stripeCustomerId) {
|
||||||
// If the user has a Stripe customer ID, attach it to the checkout session
|
// If the user has a Stripe customer ID, attach it to the checkout session
|
||||||
stripeCheckoutSessionObject.customer = stripeCustomerId;
|
stripeCheckoutSessionObject.customer = stripeCustomerId;
|
||||||
} else {
|
|
||||||
// If the user doesn't have a Stripe customer ID, create a new customer
|
|
||||||
stripeCheckoutSessionObject.customer_creation = 'always';
|
|
||||||
stripeCheckoutSessionObject.customer_email = userEmail;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a subscription checkout session with Stripe
|
// Create a subscription checkout session with Stripe
|
||||||
|
|||||||
Reference in New Issue
Block a user