stripe_customer_id retrieved from request.user relation

This commit is contained in:
Arvind Tiwari 2017-10-03 21:35:08 +05:30
parent 315ce92a78
commit c410e2cbc5

View file

@ -746,7 +746,9 @@ class OrdersHostingDetailView(LoginRequiredMixin,
def post(self, request):
template = request.session.get('template')
specs = request.session.get('specs')
stripe_customer_id = request.session.get('customer')
# We assume that if the user is here, his/her StripeCustomer
# object already exists
stripe_customer_id = request.user.stripecustomer.id
billing_address_data = request.session.get('billing_address_data')
vm_template_id = template.get('id', 1)
stripe_api_cus_id = self.request.session.get('customer')