minor bug fixed

This commit is contained in:
Daniel 2023-07-19 18:30:22 -04:00
parent 18b0271462
commit 985687ca89
3 changed files with 5 additions and 3 deletions

View File

@ -21,4 +21,5 @@ EMAIL_SERVER=
STRIPE_SECRET_KEY= STRIPE_SECRET_KEY=
PRICE_ID= PRICE_ID=
TRIAL_PERIOD_DAYS= TRIAL_PERIOD_DAYS=
NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL= NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL=
BASE_URL=http://localhost:3000

View File

@ -28,8 +28,8 @@ export default async function paymentCheckout(
], ],
mode: "subscription", mode: "subscription",
customer_email: isExistingCostomer ? undefined : email.toLowerCase(), customer_email: isExistingCostomer ? undefined : email.toLowerCase(),
success_url: "http://localhost:3000?session_id={CHECKOUT_SESSION_ID}", success_url: `${process.env.BASE_URL}?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: "http://localhost:3000/login", cancel_url: `${process.env.BASE_URL}/login`,
automatic_tax: { automatic_tax: {
enabled: true, enabled: true,
}, },

View File

@ -21,6 +21,7 @@ declare global {
PRICE_ID?: string; PRICE_ID?: string;
NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL?: string; NEXT_PUBLIC_STRIPE_BILLING_PORTAL_URL?: string;
TRIAL_PERIOD_DAYS?: string; TRIAL_PERIOD_DAYS?: string;
BASE_URL?: string;
} }
} }
} }