Added checkout error page.
ECOM-2516
This commit is contained in:
@@ -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'),
|
||||
)
|
||||
|
||||
@@ -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):
|
||||
|
||||
12
lms/templates/commerce/checkout_error.html
Normal file
12
lms/templates/commerce/checkout_error.html
Normal 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>
|
||||
Reference in New Issue
Block a user