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,8 +528,10 @@ class PaymentOrderView(FormView): | |||
|                     self.request.session['generic_payment_type'] == 'generic'): | ||||
|                 return HttpResponseRedirect( | ||||
|                     reverse('datacenterlight:order_confirmation')) | ||||
|             return HttpResponseRedirect( | ||||
|                 reverse('datacenterlight:add_ssh_key')) | ||||
|             else: | ||||
|                 self.request.session['order_confirm_url'] = reverse('datacenterlight:order_confirmation') | ||||
|                 return HttpResponseRedirect( | ||||
|                     reverse('datacenterlight:add_ssh_key')) | ||||
|         else: | ||||
|             context = self.get_context_data() | ||||
|             context['billing_address_form'] = address_form | ||||
|  |  | |||
|  | @ -769,10 +769,10 @@ class PaymentVMView(LoginRequiredMixin, FormView): | |||
|                         reverse('hosting:payment') + '#payment_error') | ||||
|                 request.session['token'] = token | ||||
|             request.session['billing_address_data'] = billing_address_data | ||||
|             return HttpResponseRedirect("{url}?{query_params}".format( | ||||
|                 url=reverse('hosting:order-confirmation'), | ||||
|                 query_params='page=payment') | ||||
|             ) | ||||
|             self.request.session['order_confirm_url'] = "{url}?{query_params}".format( | ||||
|                     url=reverse('hosting:order-confirmation'), | ||||
|                     query_params='page=payment') | ||||
|             return HttpResponseRedirect(reverse('hosting:add_ssh_key')) | ||||
|         else: | ||||
|             return self.form_invalid(form) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue