From ba92c8e416222a7fbdee0d9849dd225399861471 Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 31 Dec 2020 11:05:32 +0530 Subject: [PATCH] Do not pop billing address data from session in case of a payment failure Instead pop id_payment_method --- datacenterlight/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 43cf7eaa..1e8b1472 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -1,7 +1,7 @@ -import logging import json -import stripe +import logging +import stripe from django import forms from django.conf import settings from django.contrib import messages @@ -312,7 +312,7 @@ class PaymentOrderView(FormView): request.session.pop('vat_validation_status') request.session.pop('card_id') request.session.pop('token') - request.session.pop('billing_address_data') + request.session.pop('id_payment_method') logger.debug("Session: %s" % str(request.session)) for key, value in request.session.items(): logger.debug("Session: %s %s" % (key, value))