Added checkout error page.

ECOM-2516
This commit is contained in:
Tasawer
2015-11-04 13:28:22 +05:00
committed by Tasawer Nawaz
parent 7a7cd6e660
commit 06a91979e1
3 changed files with 20 additions and 0 deletions

View File

@@ -9,5 +9,6 @@ from commerce import views
urlpatterns = patterns(
'',
url(r'^checkout/cancel/$', views.checkout_cancel, name='checkout_cancel'),
url(r'^checkout/error/$', views.checkout_error, name='checkout_error'),
url(r'^checkout/receipt/$', views.checkout_receipt, name='checkout_receipt'),
)

View File

@@ -22,6 +22,13 @@ def checkout_cancel(_request):
return render_to_response("commerce/checkout_cancel.html", context)
@csrf_exempt
def checkout_error(_request):
""" Checkout/payment error view. """
context = {'payment_support_email': microsite.get_value('payment_support_email', settings.PAYMENT_SUPPORT_EMAIL)}
return render_to_response("commerce/checkout_error.html", context)
@csrf_exempt
@login_required
def checkout_receipt(request):

View File

@@ -0,0 +1,12 @@
<%! from django.utils.translation import ugettext as _ %>
<%inherit file="../main.html" />
<%block name="pagetitle">${_("Checkout Error")}</%block>
<section class="container">
<h1>${_("Checkout Error")}</h1>
${ _(u"An error has occurred with your payment. <b>You have not been charged.</b> Please try to submit your payment again. If this problem persists, contact {email}.").format(
email="<a href=\"mailto:{email}\">{email}</a>".format(email=payment_support_email)) }
</section>