diff --git a/src/pretix/plugins/stripe/views.py b/src/pretix/plugins/stripe/views.py index 6cc42266d4..a152775b0b 100644 --- a/src/pretix/plugins/stripe/views.py +++ b/src/pretix/plugins/stripe/views.py @@ -269,14 +269,14 @@ def charge_webhook(event, event_json, charge_id, rso): except Quota.QuotaExceededException: pass elif charge['status'] == 'failed' and payment.state in (OrderPayment.PAYMENT_STATE_PENDING, OrderPayment.PAYMENT_STATE_CREATED): - payment.info = str(charge) - payment.state = OrderPayment.PAYMENT_STATE_FAILED - payment.save() - payment.order.log_action('pretix.event.order.payment.failed', { - 'local_id': payment.local_id, - 'provider': payment.provider, - 'info': str(charge) - }) + payment.info = str(charge) + payment.state = OrderPayment.PAYMENT_STATE_FAILED + payment.save() + payment.order.log_action('pretix.event.order.payment.failed', { + 'local_id': payment.local_id, + 'provider': payment.provider, + 'info': str(charge) + }) return HttpResponse(status=200) diff --git a/src/setup.cfg b/src/setup.cfg index 44ac422713..dcdc749f22 100644 --- a/src/setup.cfg +++ b/src/setup.cfg @@ -1,5 +1,5 @@ [flake8] -ignore = N802,W503,E402,C901,E722,W504,E252 +ignore = N802,W503,E402,C901,E722,W504,E252,N812 max-line-length = 160 exclude = migrations,.ropeproject,static,mt940.py,_static,build,make_testdata.py,*/testutils/settings.py,tests/settings.py,pretix/base/models/__init__.py max-complexity = 11