changeset 162483e8a37a in modules/account_payment_stripe:default
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset&node=162483e8a37a
description:
Access to refund status as key in webhook
issue10909
review383491002
diffstat:
payment.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (18 lines):
diff -r a84c94e1d191 -r 162483e8a37a payment.py
--- a/payment.py Mon Oct 11 18:35:28 2021 +0200
+++ b/payment.py Sat Oct 30 02:21:45 2021 +0200
@@ -1042,11 +1042,11 @@
if not refunds:
logger.error("charge.refund.updated: No refund '%s'", rf['id'])
for refund in refunds:
- if rf.status == 'pending':
+ if rf['status'] == 'pending':
Refund.processing([refund])
- elif rf.status == 'succeeded':
+ elif rf['status'] == 'succeeded':
Refund.succeed([refund])
- elif rf.status in {'failed', 'canceled'}:
+ elif rf['status'] in {'failed', 'canceled'}:
refund.stripe_error_code = rf['failure_reason']
Refund.fail([refund])
refund.save()