datacenterlight invoice redesigned
This commit is contained in:
parent
313b2b2f57
commit
63ea7dac37
6 changed files with 52 additions and 147 deletions
|
|
@ -484,10 +484,10 @@ class OrderConfirmationView(DetailView):
|
|||
|
||||
@cache_control(no_cache=True, must_revalidate=True, no_store=True)
|
||||
def get(self, request, *args, **kwargs):
|
||||
if 'specs' not in request.session or 'user' not in request.session:
|
||||
return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||
if 'token' not in request.session:
|
||||
return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
||||
# if 'specs' not in request.session or 'user' not in request.session:
|
||||
# return HttpResponseRedirect(reverse('datacenterlight:index'))
|
||||
# if 'token' not in request.session:
|
||||
# return HttpResponseRedirect(reverse('datacenterlight:payment'))
|
||||
stripe_customer_id = request.session.get('customer')
|
||||
customer = StripeCustomer.objects.filter(id=stripe_customer_id).first()
|
||||
stripe_utils = StripeUtils()
|
||||
|
|
@ -503,7 +503,8 @@ class OrderConfirmationView(DetailView):
|
|||
context = {
|
||||
'site_url': reverse('datacenterlight:index'),
|
||||
'cc_last4': card_details.get('response_object').get('last4'),
|
||||
'cc_brand': card_details.get('response_object').get('brand')
|
||||
'cc_brand': card_details.get('response_object').get('brand'),
|
||||
'vm': request.session.get('specs')
|
||||
}
|
||||
return render(request, self.template_name, context)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue