mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fix #74 -- Warn if quota exceeds after payment
This commit is contained in:
@@ -39,10 +39,15 @@ def pretixcontrol_logentry_display(sender, logentry, **kwargs):
|
||||
|
||||
@receiver(signal=requiredaction_display, dispatch_uid="paypal_requiredaction_display")
|
||||
def pretixcontrol_action_display(sender, action, request, **kwargs):
|
||||
if action.action_type != 'pretix.plugins.paypal.refund':
|
||||
if not action.action_type.startswith('pretix.plugins.paypal'):
|
||||
return
|
||||
|
||||
data = json.loads(action.data)
|
||||
template = get_template('pretixplugins/paypal/action_refund.html')
|
||||
|
||||
if action.action_type == 'pretix.plugins.paypal.refund':
|
||||
template = get_template('pretixplugins/paypal/action_refund.html')
|
||||
elif action.action_type == 'pretix.plugins.paypal.overpaid':
|
||||
template = get_template('pretixplugins/paypal/action_overpaid.html')
|
||||
|
||||
ctx = {'data': data, 'event': sender, 'action': action}
|
||||
return template.render(ctx, request)
|
||||
|
||||
Reference in New Issue
Block a user