0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added stripe query param to checkout redirect urls

no-issue

The value will be set to one of 'success' or 'cancel' based on howthe
user exited the checkout flow.
This commit is contained in:
Fabien O'Carroll 2019-10-03 15:34:47 +07:00
parent 13d1a5b328
commit b8e39af7ac

View file

@ -97,11 +97,16 @@ function getStripePaymentConfig() {
const webhookHandlerUrl = new URL('/members/webhooks/stripe', siteUrl);
const checkoutSuccessUrl = new URL(siteUrl);
checkoutSuccessUrl.searchParams.set('stripe', 'success');
const checkoutCancelUrl = new URL(siteUrl);
checkoutCancelUrl.searchParams.set('stripe', 'cancel');
return {
publicKey: stripePaymentProcessor.config.public_token,
secretKey: stripePaymentProcessor.config.secret_token,
checkoutSuccessUrl: siteUrl,
checkoutCancelUrl: siteUrl,
checkoutSuccessUrl: checkoutSuccessUrl.href,
checkoutCancelUrl: checkoutCancelUrl.href,
webhookHandlerUrl: webhookHandlerUrl.href,
product: stripePaymentProcessor.config.product,
plans: stripePaymentProcessor.config.plans,