From 79562e7ad964f891dd9e917ea2aa79406ec9413b Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 12 Jul 2017 18:02:56 +0200 Subject: [PATCH] Add logdisplay for charge.pending --- src/pretix/plugins/stripe/signals.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/pretix/plugins/stripe/signals.py b/src/pretix/plugins/stripe/signals.py index 5d7951a187..98c89fcbf3 100644 --- a/src/pretix/plugins/stripe/signals.py +++ b/src/pretix/plugins/stripe/signals.py @@ -48,6 +48,10 @@ def pretixcontrol_logentry_display(sender, logentry, **kwargs): 'charge.succeeded': _('Charge succeeded.'), 'charge.refunded': _('Charge refunded.'), 'charge.updated': _('Charge updated.'), + 'charge.pending': _('Charge pending'), + 'source.chargeable': _('Payment authorized.'), + 'source.canceled': _('Payment authorization canceled.'), + 'source.failed': _('Payment authorization failed.') } if event_type in plains: @@ -60,12 +64,6 @@ def pretixcontrol_logentry_display(sender, logentry, **kwargs): text = _('Dispute updated. Reason: {}').format(data['data']['object']['reason']) elif event_type == 'charge.dispute.closed': text = _('Dispute closed. Status: {}').format(data['data']['object']['status']) - elif event_type == 'source.chargeable': - text = _('Payment authorized.') - elif event_type == 'source.canceled': - text = _('Payment authorization canceled.') - elif event_type == 'source.failed': - text = _('Payment authorization failed.') if text: return _('Stripe reported an event: {}').format(text)