Do not fail to get Stripe refund failure reason if it is not present
Closes #13590
This commit is contained in:
1 parent
0b5dd24b80
commit
60f07545e5
1 file changed
+1
-1
@@ -1153,7 +1153,7 @@ class Account(ModelSQL, ModelView):
|
||||
if not refunds:
|
||||
logger.error("charge.refund.updated: No refund '%s'", rf['id'])
|
||||
for refund in refunds:
|
||||
refund.stripe_error_code = rf['failure_reason']
|
||||
refund.stripe_error_code = rf.get('failure_reason')
|
||||
if rf['status'] == 'pending':
|
||||
Refund.process([refund])
|
||||
elif rf['status'] == 'succeeded':
|
||||
|
||||
Reference in new issue
Block a user