changeset 0b6a6d0c6b1a in modules/account_payment_stripe:6.0
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset&node=0b6a6d0c6b1a
description:
Access to refund status as key in webhook
issue10909
review383491002
(grafted from 162483e8a37ab1b22a63bc49659ca19555d6835b)
diffstat:
payment.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (18 lines):
diff -r 3003245c95cd -r 0b6a6d0c6b1a payment.py
--- a/payment.py Mon May 03 15:53:12 2021 +0200
+++ b/payment.py Sat Oct 30 02:21:45 2021 +0200
@@ -1125,11 +1125,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()