Enabled asynchronous cart/order actions

This commit is contained in:
Raphael Michel
2015-10-04 19:54:17 +02:00
parent 4c6b292968
commit c4638a3402
28 changed files with 572 additions and 196 deletions

View File

@@ -116,7 +116,6 @@ class Stripe(BasePaymentProvider):
if charge.status == 'succeeded' and charge.paid:
try:
mark_order_paid(order, 'stripe', str(charge))
messages.success(request, _('We successfully received your payment. Thank you!'))
except Quota.QuotaExceededException as e:
messages.error(request, str(e))
else:

View File

@@ -20,7 +20,7 @@ def html_head_presale(sender, request=None, **kwargs):
provider = Stripe(sender)
url = resolve(request.path_info)
if provider.is_enabled and ("checkout.payment" in url.url_name or "order.pay" in url.url_name):
if provider.is_enabled and ("checkout" in url.url_name or "order.pay" in url.url_name):
template = get_template('pretixplugins/stripe/presale_head.html')
ctx = Context({'event': sender, 'settings': provider.settings})
return template.render(ctx)