diff --git a/ghost/stripe/lib/StripeAPI.js b/ghost/stripe/lib/StripeAPI.js index 8e0c58bcbd..c7a271c578 100644 --- a/ghost/stripe/lib/StripeAPI.js +++ b/ghost/stripe/lib/StripeAPI.js @@ -47,6 +47,10 @@ module.exports = class StripeAPI { this._configured = false; } + get PAYMENT_METHOD_TYPES() { + return ['card']; + } + get configured() { return this._configured; } @@ -458,7 +462,7 @@ module.exports = class StripeAPI { } let stripeSessionOptions = { - payment_method_types: ['card'], + payment_method_types: this.PAYMENT_METHOD_TYPES, success_url: options.successUrl || this._config.checkoutSessionSuccessUrl, cancel_url: options.cancelUrl || this._config.checkoutSessionCancelUrl, // @ts-ignore - we need to update to latest stripe library to correctly use newer features @@ -552,7 +556,7 @@ module.exports = class StripeAPI { await this._rateLimitBucket.throttle(); const session = await this._stripe.checkout.sessions.create({ mode: 'setup', - payment_method_types: ['card'], + payment_method_types: this.PAYMENT_METHOD_TYPES, success_url: options.successUrl || this._config.checkoutSetupSessionSuccessUrl, cancel_url: options.cancelUrl || this._config.checkoutSetupSessionCancelUrl, customer_email: customer.email,