diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index b96d5123..d6c87266 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -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'); {%endblock%} diff --git a/datacenterlight/views.py b/datacenterlight/views.py index e3974e3e..a4458cc2 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -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))