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:
parent
13d1a5b328
commit
b8e39af7ac
1 changed files with 7 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue