Commit a32a5af5 authored by PCoder's avatar PCoder

Add code to differentiate between subscription and non-subscription in js

parent 9faf8978
......@@ -337,5 +337,6 @@
var success_title = '{{ success_msg.msg_title }}';
var success_url = '{{ success_msg.redirect }}';
window.stripeKey = "{{stripe_key}}";
window.isSubscription = ("{{is_subscription}}" === 'true');
</script>
{%endblock%}
......@@ -729,6 +729,10 @@ class OrderConfirmationView(DetailView, FormView):
reverse('datacenterlight:index')
},
'stripe_key': settings.STRIPE_API_PUBLIC_KEY,
'is_subscription': 'true' if (
'generic_payment_type' not in request.session or
(request.session['generic_payment_details']['recurring'])
) else 'false'
})
logger.debug("Request %s" % create_incomplete_intent_request(
self.request))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment