mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Refs #33 -- Added UI and Stripe support for retrying failed payments
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user