mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-20 05:43:38 +00:00
push currency default to seperate var
This commit is contained in:
parent
20f0c648e5
commit
6efda9cf1c
1 changed files with 3 additions and 2 deletions
|
@ -37,10 +37,11 @@ module.exports = SubscriptionController =
|
||||||
if hasSubscription or !plan?
|
if hasSubscription or !plan?
|
||||||
res.redirect "/user/subscription"
|
res.redirect "/user/subscription"
|
||||||
else
|
else
|
||||||
|
currency = req.query.currency || "USD"
|
||||||
RecurlyWrapper.sign {
|
RecurlyWrapper.sign {
|
||||||
subscription:
|
subscription:
|
||||||
plan_code : req.query.planCode
|
plan_code : req.query.planCode
|
||||||
currency: req.query.currency
|
currency: currency
|
||||||
account_code: user.id
|
account_code: user.id
|
||||||
}, (error, signature) ->
|
}, (error, signature) ->
|
||||||
return next(error) if error?
|
return next(error) if error?
|
||||||
|
@ -48,7 +49,7 @@ module.exports = SubscriptionController =
|
||||||
title : "subscribe"
|
title : "subscribe"
|
||||||
plan_code: req.query.planCode
|
plan_code: req.query.planCode
|
||||||
recurlyConfig: JSON.stringify
|
recurlyConfig: JSON.stringify
|
||||||
currency: req.query.currency || "USD"
|
currency: currency
|
||||||
subdomain: Settings.apis.recurly.subdomain
|
subdomain: Settings.apis.recurly.subdomain
|
||||||
subscriptionFormOptions: JSON.stringify
|
subscriptionFormOptions: JSON.stringify
|
||||||
acceptedCards: ['discover', 'mastercard', 'visa']
|
acceptedCards: ['discover', 'mastercard', 'visa']
|
||||||
|
|
Loading…
Reference in a new issue