Skip to content

Commit aa3f62c

Browse files
authored
Remove temporary adjustments (#239)
2 parents 88873c5 + 0109464 commit aa3f62c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Calculator/PaymentFee/FixedAmountAndPercentageCalculator.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public function calculate(OrderInterface $order, MollieGatewayConfig $paymentMet
5151
$percentageAmount = $this->getSumOfCalculatedValue($order->getAdjustments(AdjustmentInterface::PERCENTAGE_ADJUSTMENT));
5252
$fixedAmount = $this->getSumOfCalculatedValue($order->getAdjustments(AdjustmentInterface::FIXED_AMOUNT_ADJUSTMENT));
5353

54+
$order->removeAdjustments(AdjustmentInterface::FIXED_AMOUNT_ADJUSTMENT);
55+
$order->removeAdjustments(AdjustmentInterface::PERCENTAGE_ADJUSTMENT);
56+
5457
$totalAmount = $percentageAmount + $fixedAmount;
5558

5659
if ($totalAmount > $limit) {

0 commit comments

Comments
 (0)