From 3075cffd771a0cd97c88e0960e78abf612c10f44 Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 26 Sep 2018 23:00:57 +0200 Subject: [PATCH] Include product_id in generic payment Stripe plan name --- datacenterlight/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index dc68dfa3..8cacacb4 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -356,8 +356,6 @@ class PaymentOrderView(FormView): ), "product_id": product.id } - - # gp_details['product_id'] = product.id request.session["generic_payment_details"] = ( gp_details ) @@ -642,7 +640,10 @@ class OrderConfirmationView(DetailView): 2 ) ) - plan_name = "generic-{0:.2f}".format(amount_to_be_charged) + plan_name = "generic-{}-{0:.2f}".format( + request.session['generic_payment_details']['product_id'], + amount_to_be_charged + ) stripe_plan_id = plan_name else: template = request.session.get('template')