changeset a75b48c410b2 in modules/account_payment_stripe:5.4
details:
https://hg.tryton.org/modules/account_payment_stripe?cmd=changeset;node=a75b48c410b2
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 5eac9896e4c6 -r a75b48c410b2 payment.py
--- a/payment.py Tue Jun 16 19:24:33 2020 +0200
+++ b/payment.py Mon Jul 13 20:54:31 2020 +0200
@@ -988,7 +988,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])