changeset da411b32df06 in modules/account_payment_stripe:5.6
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset;node=da411b32df06
description:
Deduce dispute amount only if smaller than amount
The dispute amount is based on the initial amount of the charge. So if
there
was already refunds that reduced the payment amount, we must not set a
negative
amount.
issue9452
review290491002
(grafted from b17ec8f1c68cb52d476741a05d6d2b7264044656)
diffstat:
payment.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 3a734a06bc40 -r da411b32df06 payment.py
--- a/payment.py Tue Jun 16 19:23:42 2020 +0200
+++ b/payment.py Mon Jul 13 20:54:31 2020 +0200
@@ -1231,7 +1231,7 @@
payment.save()
if source['status'] == 'lost':
Payment.fail([payment])
- if payment.stripe_amount != source['amount']:
+ if payment.stripe_amount > source['amount']:
payment.stripe_amount -= source['amount']
payment.save()
Payment.succeed([payment])