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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user