Fixed default urls for checkout session

no-issue
related to ef9cb0862c

In the last patch which fixes the bug for not passing custom redirect urls when a checkout session is created, we missed updating the case where a logged in member tries to update the subscription.
This commit is contained in:
Rish 2021-02-01 10:24:16 +05:30
parent f823334b15
commit 4b4a990e1d

View File

@ -271,8 +271,8 @@ module.exports = class RouterController {
try { try {
const session = await this._stripeAPIService.createCheckoutSession(plan, stripeCustomer, { const session = await this._stripeAPIService.createCheckoutSession(plan, stripeCustomer, {
successUrl: req.body.successUrl, successUrl: req.body.successUrl || this._config.checkoutSuccessUrl,
cancelUrl: req.body.cancelUrl, cancelUrl: req.body.cancelUrl || this._config.checkoutCancelUrl,
metadata: req.body.metadata metadata: req.body.metadata
}); });
const publicKey = this._stripeAPIService.getPublicKey(); const publicKey = this._stripeAPIService.getPublicKey();