mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-23 18:51:36 +00:00
Merge pull request #2895 from overleaf/jel-groups-itm-content
Include itm_content in redirect to payment page GitOrigin-RevId: 4dea2777ed9d1d4a45edbe29371971418681375d
This commit is contained in:
parent
7d98a82208
commit
cc018357e1
1 changed files with 14 additions and 4 deletions
|
@ -285,7 +285,8 @@ App.controller('PlansController', function(
|
|||
App.controller('GroupPlansModalPurchaseController', function(
|
||||
$scope,
|
||||
$modal,
|
||||
$location
|
||||
$location,
|
||||
$httpParamSerializer
|
||||
) {
|
||||
$scope.options = {
|
||||
plan_codes: [
|
||||
|
@ -393,8 +394,17 @@ App.controller('GroupPlansModalPurchaseController', function(
|
|||
$scope.recalculatePrice()
|
||||
|
||||
$scope.purchase = function() {
|
||||
let { plan_code, size, usage, currency } = $scope.selected
|
||||
plan_code = `group_${plan_code}_${size}_${usage}`
|
||||
window.location = `/user/subscription/new?planCode=${plan_code}¤cy=${currency}&itm_campaign=groups`
|
||||
const { plan_code, size, usage, currency } = $scope.selected
|
||||
const queryParams = {
|
||||
planCode: `group_${plan_code}_${size}_${usage}`,
|
||||
currency,
|
||||
itm_campaign: 'groups'
|
||||
}
|
||||
if ($location.search().itm_content) {
|
||||
queryParams.itm_content = $location.search().itm_content
|
||||
}
|
||||
window.location = `/user/subscription/new?${$httpParamSerializer(
|
||||
queryParams
|
||||
)}`
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue