|
@@ -32,7 +32,6 @@ const validGroupPlanModalOptions = {
|
|
|
|
|
|
|
|
async function plansPage(req, res) {
|
|
async function plansPage(req, res) {
|
|
|
const plans = SubscriptionViewModelBuilder.buildPlansList()
|
|
const plans = SubscriptionViewModelBuilder.buildPlansList()
|
|
|
-
|
|
|
|
|
let currency = null
|
|
let currency = null
|
|
|
const queryCurrency = req.query.currency?.toUpperCase()
|
|
const queryCurrency = req.query.currency?.toUpperCase()
|
|
|
if (GeoIpLookup.isValidCurrencyParam(queryCurrency)) {
|
|
if (GeoIpLookup.isValidCurrencyParam(queryCurrency)) {
|
|
@@ -66,7 +65,6 @@ async function plansPage(req, res) {
|
|
|
currency: getDefault('currency', 'currency', defaultGroupPlanModalCurrency),
|
|
currency: getDefault('currency', 'currency', defaultGroupPlanModalCurrency),
|
|
|
usage: getDefault('usage', 'usage', 'enterprise'),
|
|
usage: getDefault('usage', 'usage', 'enterprise'),
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
const plansPageViewSegmentation = {
|
|
const plansPageViewSegmentation = {
|
|
|
currency: recommendedCurrency,
|
|
currency: recommendedCurrency,
|
|
|
countryCode,
|
|
countryCode,
|
|
@@ -94,6 +92,7 @@ async function plansPage(req, res) {
|
|
|
initialLocalizedGroupPrice:
|
|
initialLocalizedGroupPrice:
|
|
|
SubscriptionHelper.generateInitialLocalizedGroupPrice(currency),
|
|
SubscriptionHelper.generateInitialLocalizedGroupPrice(currency),
|
|
|
showInrGeoBanner: countryCode === 'IN',
|
|
showInrGeoBanner: countryCode === 'IN',
|
|
|
|
|
+ showBrlGeoBanner: countryCode === 'BR',
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -210,7 +209,6 @@ async function interstitialPaymentPage(req, res) {
|
|
|
|
|
|
|
|
const hasSubscription =
|
|
const hasSubscription =
|
|
|
await LimitationsManager.promises.userHasV1OrV2Subscription(user)
|
|
await LimitationsManager.promises.userHasV1OrV2Subscription(user)
|
|
|
-
|
|
|
|
|
const showSkipLink = req.query?.skipLink === 'true'
|
|
const showSkipLink = req.query?.skipLink === 'true'
|
|
|
|
|
|
|
|
if (hasSubscription) {
|
|
if (hasSubscription) {
|
|
@@ -235,6 +233,7 @@ async function interstitialPaymentPage(req, res) {
|
|
|
interstitialPaymentConfig,
|
|
interstitialPaymentConfig,
|
|
|
showSkipLink,
|
|
showSkipLink,
|
|
|
showInrGeoBanner: countryCode === 'IN',
|
|
showInrGeoBanner: countryCode === 'IN',
|
|
|
|
|
+ showBrlGeoBanner: countryCode === 'BR',
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -552,7 +551,7 @@ async function _getRecommendedCurrency(req, res) {
|
|
|
const countryCode = currencyLookup.countryCode
|
|
const countryCode = currencyLookup.countryCode
|
|
|
let recommendedCurrency = currencyLookup.currencyCode
|
|
let recommendedCurrency = currencyLookup.currencyCode
|
|
|
|
|
|
|
|
- if (['BRL', 'MXN', 'COP', 'CLP', 'PEN'].includes(recommendedCurrency)) {
|
|
|
|
|
|
|
+ if (['MXN', 'COP', 'CLP', 'PEN'].includes(recommendedCurrency)) {
|
|
|
recommendedCurrency = GeoIpLookup.DEFAULT_CURRENCY_CODE
|
|
recommendedCurrency = GeoIpLookup.DEFAULT_CURRENCY_CODE
|
|
|
}
|
|
}
|
|
|
|
|
|