fix(core-flows): return refunded when all captured payments have been refunded (#10923)

what:

- returns refunded when all captured payments have been refunded
This commit is contained in:
Riqwan Thamir
2025-01-13 17:25:39 +01:00
committed by GitHub
parent 60dc8f69c7
commit 7232a8a930
2 changed files with 9 additions and 1 deletions

View File

@@ -55,7 +55,10 @@ export const getLastPaymentStatus = (order: OrderDetailDTO) => {
}
if (paymentStatus[PaymentStatus.REFUNDED] > 0) {
if (paymentStatus[PaymentStatus.REFUNDED] === totalPaymentExceptCanceled) {
if (
paymentStatus[PaymentStatus.REFUNDED] ===
paymentStatus[PaymentStatus.CAPTURED]
) {
return PaymentStatus.REFUNDED
}