Skip to content

Commit

Permalink
fixup! Passed currency to stripe checkout setup session
Browse files Browse the repository at this point in the history
  • Loading branch information
allouis committed Apr 24, 2024
1 parent 5229a9c commit 0fc0ead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ghost/members-api/lib/controllers/RouterController.js
Expand Up @@ -119,7 +119,7 @@ module.exports = class RouterController {
return ['active', 'trialing', 'unpaid', 'past_due'].includes(sub.get('status'));
});

let currency = activeSubscription.get('plan_currency');
let currency = activeSubscription?.get('plan_currency') || undefined;

let customer;
if (!req.body.subscription_id) {
Expand All @@ -135,7 +135,7 @@ module.exports = class RouterController {
});
return res.end(`Could not find subscription ${req.body.subscription_id}`);
}
currency = subscription.get('plan_currency');
currency = subscription.get('plan_currency') || undefined;
customer = await this._stripeAPIService.getCustomer(subscription.get('customer_id'));
}

Expand Down

0 comments on commit 0fc0ead

Please sign in to comment.