mirror of
https://github.com/documenso/documenso.git
synced 2025-11-17 02:01:33 +10:00
fix: stripe customer fetch logic
This commit is contained in:
@ -26,8 +26,10 @@ export const createBillingPortal = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fallback to check if a Stripe customer already exists for the current user.
|
// Fallback to check if a Stripe customer already exists for the current user email.
|
||||||
stripeCustomer = await getStripeCustomerByEmail(user.email);
|
if (!stripeCustomer) {
|
||||||
|
stripeCustomer = await getStripeCustomerByEmail(user.email);
|
||||||
|
}
|
||||||
|
|
||||||
// Create a Stripe customer if it does not exist for the current user.
|
// Create a Stripe customer if it does not exist for the current user.
|
||||||
if (!stripeCustomer) {
|
if (!stripeCustomer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user