We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 997cb0fe authored by Rik ter Beek's avatar Rik ter Beek

#72 if amount is zero then the payment method is already fully refunded go to next split pyament

parent 06f2386a
...@@ -112,6 +112,11 @@ class RefundDataBuilder implements BuilderInterface ...@@ -112,6 +112,11 @@ class RefundDataBuilder implements BuilderInterface
// total authorised amount of the split payment // total authorised amount of the split payment
$splitPaymentAmount = $splitPayment->getAmount() - $splitPayment->getTotalRefunded(); $splitPaymentAmount = $splitPayment->getAmount() - $splitPayment->getTotalRefunded();
// if rest amount is zero go to next payment
if (!$splitPaymentAmount > 0) {
continue;
}
// if refunded amount is greather then split payment amount do a full refund // if refunded amount is greather then split payment amount do a full refund
if ($amount >= $splitPaymentAmount) { if ($amount >= $splitPaymentAmount) {
$modificationAmount = $splitPaymentAmount; $modificationAmount = $splitPaymentAmount;
...@@ -149,6 +154,8 @@ class RefundDataBuilder implements BuilderInterface ...@@ -149,6 +154,8 @@ class RefundDataBuilder implements BuilderInterface
] ]
]; ];
} }
print_R($result);die();
return $result; return $result;
} }
} }
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment