Refs #33 -- Added UI and Stripe support for retrying failed payments

This commit is contained in:
Raphael Michel
2015-06-25 15:49:14 +02:00
parent 224eaeee48
commit f04c43abdc
14 changed files with 287 additions and 57 deletions

View File

@@ -11,15 +11,17 @@ from pretix.presale.signals import html_head
@receiver(register_payment_providers)
def register_payment_provider(sender, **kwargs):
from .payment import Stripe
return Stripe
@receiver(html_head)
def html_head_presale(sender, request=None, **kwargs):
from .payment import Stripe
provider = Stripe(sender)
url = resolve(request.path_info)
if provider.is_enabled and "checkout.payment" in url.url_name:
if provider.is_enabled and ("checkout.payment" 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)