Commit d8a674da authored by PCoder's avatar PCoder

Remove unwanted code + doc

parent 9524e037
......@@ -587,6 +587,7 @@ class OrderConfirmationView(DetailView, FormView):
# this is amount to be charge/subscribed before VAT and discount
# and expressed in chf. To convert to cents, multiply by 100
amount_to_charge = 0
vm_specs = None
if (('specs' not in request.session or 'user' not in request.session)
and 'generic_payment_type' not in request.session):
return HttpResponseRedirect(reverse('datacenterlight:index'))
......@@ -875,18 +876,6 @@ class OrderConfirmationView(DetailView, FormView):
if gp_details['recurring']:
# generic recurring payment
logger.debug("Commencing a generic recurring payment")
# generic one time payment
logger.debug("Commencing a one time payment")
charge_response = stripe_utils.make_charge(
stripe_onetime_charge = charge_response.get('response_object')
# Check if the payment was approved
if not stripe_onetime_charge:
msg = charge_response.get('error')
return show_error(msg, self.request)
if ('generic_payment_type' not in request.session or
recurring_interval = 'month'
......@@ -1079,7 +1068,6 @@ class OrderConfirmationView(DetailView, FormView):
return JsonResponse(context)
......@@ -1089,6 +1077,10 @@ class OrderConfirmationView(DetailView, FormView):
msg = subscription_result.get('error')
return show_error(msg, self.request)
# the code below is executed for
# a) subscription case
# b) the subscription object is active itself, without requiring
provisioning_response = do_provisioning(
req, stripe_api_cus_id,
card_details_response, stripe_subscription_obj,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment