diff --git a/Plugin/Tax/Helper/Data.php b/Plugin/Tax/Helper/Data.php index 46c8e01a979..4dab1a67857 100644 --- a/Plugin/Tax/Helper/Data.php +++ b/Plugin/Tax/Helper/Data.php @@ -58,10 +58,20 @@ public function afterGetCalculatedTaxes(Subject $subject, array $result, $source $this->result = $result; $order = $source->getOrder(); + if (!$order->getPayment() || + strstr($order->getPayment()->getMethod(), 'mollie_methods_') === false + ) { + return $result; + } + $amount = $order->getMolliePaymentFee(); $taxAmount = $order->getMolliePaymentFeeTax(); $baseTaxAmount = $order->getMolliePaymentFee(); - $rate = round(($taxAmount / $amount) * 100); + + $rate = 0; + if ((float)$order->getMolliePaymentFeeTax()) { + $rate = round(($taxAmount / $amount) * 100); + } $taxClassId = $this->config->paymentSurchargeTaxClass( $order->getPayment()->getMethod(), diff --git a/composer.json b/composer.json index b3836ef75b0..17cbd0e3ad2 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "mollie/magento2", "description": "Mollie Payment Module for Magento 2", - "version": "2.32.0", + "version": "2.32.1", "keywords": [ "mollie", "payment", diff --git a/etc/config.xml b/etc/config.xml index 7bdeda35b6f..d08d74ed199 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -3,7 +3,7 @@ - v2.32.0 + v2.32.1 0 0 test