Set respective order_confirm_url for landing vs hosting flows
For hosting flow also take the user to add_ssh_key after payment
This commit is contained in:
parent
c35bc79c5c
commit
c285e1d9eb
2 changed files with 8 additions and 6 deletions
|
@ -528,6 +528,8 @@ class PaymentOrderView(FormView):
|
||||||
self.request.session['generic_payment_type'] == 'generic'):
|
self.request.session['generic_payment_type'] == 'generic'):
|
||||||
return HttpResponseRedirect(
|
return HttpResponseRedirect(
|
||||||
reverse('datacenterlight:order_confirmation'))
|
reverse('datacenterlight:order_confirmation'))
|
||||||
|
else:
|
||||||
|
self.request.session['order_confirm_url'] = reverse('datacenterlight:order_confirmation')
|
||||||
return HttpResponseRedirect(
|
return HttpResponseRedirect(
|
||||||
reverse('datacenterlight:add_ssh_key'))
|
reverse('datacenterlight:add_ssh_key'))
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -769,10 +769,10 @@ class PaymentVMView(LoginRequiredMixin, FormView):
|
||||||
reverse('hosting:payment') + '#payment_error')
|
reverse('hosting:payment') + '#payment_error')
|
||||||
request.session['token'] = token
|
request.session['token'] = token
|
||||||
request.session['billing_address_data'] = billing_address_data
|
request.session['billing_address_data'] = billing_address_data
|
||||||
return HttpResponseRedirect("{url}?{query_params}".format(
|
self.request.session['order_confirm_url'] = "{url}?{query_params}".format(
|
||||||
url=reverse('hosting:order-confirmation'),
|
url=reverse('hosting:order-confirmation'),
|
||||||
query_params='page=payment')
|
query_params='page=payment')
|
||||||
)
|
return HttpResponseRedirect(reverse('hosting:add_ssh_key'))
|
||||||
else:
|
else:
|
||||||
return self.form_invalid(form)
|
return self.form_invalid(form)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue