Skip to content

Commit c15eaf0

Browse files
Merge pull request #130 from buckaroo-it/feature/BP-699-fix-partial-refund-from-plaza
BP-699 Magento 2 - The order has incorrect order status after partial refund from Plaza
2 parents 3d33aa3 + f625520 commit c15eaf0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Model/Refund/Push.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,17 @@ public function calculateRemainder()
344344
- $baseTotalToBeRefunded
345345
- $this->order->getBaseTotalRefunded();
346346

347+
$this->logging->addDebug(__METHOD__.'|5|'.var_export([
348+
$this->totalAmountToRefund(), $this->order->getBaseGrandTotal(), $remainderToRefund
349+
], true));
350+
347351
if ($this->totalAmountToRefund() == $this->order->getBaseGrandTotal()) {
352+
$this->logging->addDebug(__METHOD__.'|10|');
353+
$remainderToRefund = 0;
354+
}
355+
356+
if ($remainderToRefund < 0.01) {
357+
$this->logging->addDebug(__METHOD__.'|15|');
348358
$remainderToRefund = 0;
349359
}
350360

0 commit comments

Comments
 (0)