Include product_id in generic payment Stripe plan name

This commit is contained in:
PCoder 2018-09-26 23:00:57 +02:00
parent 232022aaaf
commit 3075cffd77

View file

@ -356,8 +356,6 @@ class PaymentOrderView(FormView):
), ),
"product_id": product.id "product_id": product.id
} }
# gp_details['product_id'] = product.id
request.session["generic_payment_details"] = ( request.session["generic_payment_details"] = (
gp_details gp_details
) )
@ -642,7 +640,10 @@ class OrderConfirmationView(DetailView):
2 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 stripe_plan_id = plan_name
else: else:
template = request.session.get('template') template = request.session.get('template')