Fix UnboundLocalError: local variable 'stripe_onetime_charge' referenced before assignment

This commit is contained in:
PCoder 2020-12-23 11:26:52 +05:30
parent 1ed42e608c
commit 50d9eb1c50

View file

@ -706,6 +706,12 @@ class OrderConfirmationView(DetailView, FormView):
return render(request, self.template_name, context) return render(request, self.template_name, context)
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
stripe_onetime_charge = None
stripe_customer_obj = None
gp_details = None
specs = None
vm_template_id = 0
template = None
user = request.session.get('user') user = request.session.get('user')
stripe_api_cus_id = request.session.get('customer') stripe_api_cus_id = request.session.get('customer')
stripe_utils = StripeUtils() stripe_utils = StripeUtils()