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:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/core-flows": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(core-flows): return refunded when all captured payments have been refunded
|
||||||
@@ -55,7 +55,10 @@ export const getLastPaymentStatus = (order: OrderDetailDTO) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (paymentStatus[PaymentStatus.REFUNDED] > 0) {
|
if (paymentStatus[PaymentStatus.REFUNDED] > 0) {
|
||||||
if (paymentStatus[PaymentStatus.REFUNDED] === totalPaymentExceptCanceled) {
|
if (
|
||||||
|
paymentStatus[PaymentStatus.REFUNDED] ===
|
||||||
|
paymentStatus[PaymentStatus.CAPTURED]
|
||||||
|
) {
|
||||||
return PaymentStatus.REFUNDED
|
return PaymentStatus.REFUNDED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user