Pass user param with request dict
This commit is contained in:
parent
a32a5af5a3
commit
9524e03762
1 changed files with 6 additions and 2 deletions
|
@ -788,7 +788,8 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
'new_user_hosting_key_id': new_user_hosting_key_id,
|
'new_user_hosting_key_id': new_user_hosting_key_id,
|
||||||
'card_id': card_id,
|
'card_id': card_id,
|
||||||
'generic_payment_type': generic_payment_type,
|
'generic_payment_type': generic_payment_type,
|
||||||
'generic_payment_details': generic_payment_details
|
'generic_payment_details': generic_payment_details,
|
||||||
|
'user': user
|
||||||
}
|
}
|
||||||
|
|
||||||
if 'id_payment_method' in request.session:
|
if 'id_payment_method' in request.session:
|
||||||
|
@ -1089,7 +1090,7 @@ class OrderConfirmationView(DetailView, FormView):
|
||||||
msg = subscription_result.get('error')
|
msg = subscription_result.get('error')
|
||||||
return show_error(msg, self.request)
|
return show_error(msg, self.request)
|
||||||
provisioning_response = do_provisioning(
|
provisioning_response = do_provisioning(
|
||||||
req, user, stripe_api_cus_id,
|
req, stripe_api_cus_id,
|
||||||
card_details_response, stripe_subscription_obj,
|
card_details_response, stripe_subscription_obj,
|
||||||
stripe_onetime_charge, gp_details, specs, vm_template_id,
|
stripe_onetime_charge, gp_details, specs, vm_template_id,
|
||||||
template, request.session.get('billing_address_data'),
|
template, request.session.get('billing_address_data'),
|
||||||
|
@ -1405,6 +1406,9 @@ def do_provisioning(request, stripe_api_cus_id, card_details_response,
|
||||||
:param real_request:
|
:param real_request:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
user = request.get('user', None)
|
||||||
|
|
||||||
# Create user if the user is not logged in and if he is not already
|
# Create user if the user is not logged in and if he is not already
|
||||||
# registered
|
# registered
|
||||||
custom_user, new_user = get_or_create_custom_user(
|
custom_user, new_user = get_or_create_custom_user(
|
||||||
|
|
Loading…
Reference in a new issue