From 0be7c7663d9dde0895abdc8eaa24ef1c87f56238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Manciot?= Date: Sun, 4 Aug 2024 04:32:12 +0200 Subject: [PATCH] update refund for MangoPay --- .../scala/app/softnetwork/payment/spi/MangoPayProvider.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mangopay/src/main/scala/app/softnetwork/payment/spi/MangoPayProvider.scala b/mangopay/src/main/scala/app/softnetwork/payment/spi/MangoPayProvider.scala index 92d47a2..5b45835 100644 --- a/mangopay/src/main/scala/app/softnetwork/payment/spi/MangoPayProvider.scala +++ b/mangopay/src/main/scala/app/softnetwork/payment/spi/MangoPayProvider.scala @@ -1199,7 +1199,7 @@ trait MangoPayProvider extends PaymentProvider { refund.getRefundReason.setRefundReasonType(RefundReasonType.OTHER) } refund.setDebitedFunds(new Money) - refund.getDebitedFunds.setAmount(refundAmount) + refund.getDebitedFunds.setAmount(refundAmount + feesRefundAmount.getOrElse(0)) refund.getDebitedFunds.setCurrency(CurrencyIso.valueOf(currency)) refund.setFees(new Money) refund.getFees.setAmount(0) // fees are only set during transfer or payOut