diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d82522e9..b20b212f 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -441,7 +441,7 @@ class OrderConfirmationView(DetailView): if not card_details.get('response_object') and not card_details.get('paid'): msg = card_details.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='failed_payment') - return HttpResponseRedirect(reverse('datacenterlight:payment')) + return HttpResponseRedirect(reverse('datacenterlight:payment') + '#dcl_payment_error') context = { 'site_url': reverse('datacenterlight:index'), @@ -472,7 +472,7 @@ class OrderConfirmationView(DetailView): if not charge_response.get('response_object') and not charge_response.get('paid'): msg = charge_response.get('error') messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error') - return HttpResponseRedirect(reverse('datacenterlight:payment')) + return HttpResponseRedirect(reverse('datacenterlight:payment') + '#dcl_payment_error') charge = charge_response.get('response_object') diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index cb7a4d8c..4c4ffa62 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -85,13 +85,29 @@
- {% blocktrans %} - You are not making any payment yet. After submitting your card - information, you will be taken to the Confirm Order Page. - {% endblocktrans %} -
-+ {% blocktrans %} + You are not making any payment yet. After submitting your card + information, you will be taken to the Confirm Order Page. + {% endblocktrans %} +
+ {% endif %} +{{ message|safe }}
++ {{ error|escape }} +
+ {% endfor %} +{% blocktrans %} You are not making any payment yet. After submitting your card @@ -137,22 +153,20 @@ {% endblocktrans %}
{% endif %} -{{ message|safe }}
- {{ error|escape }} -
- {% endfor %} - {% endif %} + {% for error in form.non_field_errors %} ++ {{ error|escape }} +
+ {% endfor %}- {% bootstrap_alert paymentError alert_type='danger' %} -
-