Clear token and card form variables explicitly

This commit is contained in:
PCoder 2017-10-30 00:26:18 +01:00
parent 16b6ecb38c
commit 24d904288f

View file

@ -356,6 +356,10 @@ class PaymentOrderView(FormView):
) )
if 'billing_address_data' in self.request.session: if 'billing_address_data' in self.request.session:
billing_address_data = self.request.session['billing_address_data'] billing_address_data = self.request.session['billing_address_data']
if 'token' in billing_address_data:
billing_address_data.pop('token')
if 'card' in billing_address_data:
billing_address_data.pop('card')
else: else:
billing_address_data = {} billing_address_data = {}
if self.request.user.is_authenticated(): if self.request.user.is_authenticated():