Skip to content

Commit

Permalink
Merge pull request #706 from mollie/release/2.32.1
Browse files Browse the repository at this point in the history
Release/2.32.1
  • Loading branch information
Marvin-Magmodules committed Oct 24, 2023
2 parents 7d0333d + e411130 commit 8a25f25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion Plugin/Tax/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<default>
<payment>
<mollie_general>
<version>v2.32.0</version>
<version>v2.32.1</version>
<active>0</active>
<enabled>0</enabled>
<type>test</type>
Expand Down

0 comments on commit 8a25f25

Please sign in to comment.