Fixed issue with one-time payments; Updated packages

This commit is contained in:
giancarlo
2024-05-18 22:56:57 +07:00
parent 5c1e1d5cd0
commit 3cf3c263bc
25 changed files with 541 additions and 604 deletions

View File

@@ -55,9 +55,10 @@ export async function createStripeCheckout(
customer_email: params.customerEmail,
};
const customerCreation = isSubscription
? ({} as Record<string, string>)
: { customer_creation: 'always' };
const customerCreation =
isSubscription || customer
? ({} as Record<string, string>)
: { customer_creation: 'always' };
const lineItems = params.plan.lineItems.map((item) => {
if (item.type === 'metered') {