Updated dependencies, Added Hosted mode for Stripe checkout

* chore: bump version to 3.1.0 and update dependencies in package.json, pnpm-lock.yaml, and pnpm-workspace.yaml; enhance billing services with support for hosted checkout page in Stripe integration

* Enhance error handling in billing services to log error messages instead of objects; update documentation for Stripe integration to clarify publishable key requirements based on UI mode.
This commit is contained in:
Giancarlo Buomprisco
2026-03-31 12:44:30 +08:00
committed by GitHub
parent 9d7c7f8030
commit 6268d1bab0
15 changed files with 1018 additions and 566 deletions

View File

@@ -47,9 +47,9 @@ export class StripeBillingStrategyService implements BillingStrategyProviderServ
logger.info(ctx, 'Creating checkout session...');
const { client_secret } = await createStripeCheckout(stripe, params);
const { client_secret, url } = await createStripeCheckout(stripe, params);
if (!client_secret) {
if (!client_secret && !url) {
logger.error(ctx, 'Failed to create checkout session');
throw new Error('Failed to create checkout session');
@@ -57,7 +57,10 @@ export class StripeBillingStrategyService implements BillingStrategyProviderServ
logger.info(ctx, 'Checkout session created successfully');
return { checkoutToken: client_secret };
return {
checkoutToken: client_secret ?? null,
url,
};
}
/**