Closed gerben86 closed 1 year ago
I'm also using Fooman module Fooman_Surcharge, so maybe it's related to this fixed issue: https://github.com/mollie/magento2/issues/512
Hello @gerben86 ,
Thank you for opening this issue and adding the comment regarding the Fooman_Surcharge
module.
As we don’t have access to this module, could you check if this patch fixes the issue for you?
diff --git a/Service/Order/Lines/Generator/FoomanTotals.php b/Service/Order/Lines/Generator/FoomanTotals.php
index 68630ce..3c292ce 100644
--- a/Service/Order/Lines/Generator/FoomanTotals.php
+++ b/Service/Order/Lines/Generator/FoomanTotals.php
@@ -59,7 +59,7 @@ class FoomanTotals implements GeneratorInterface
$taxAmount = $forceBaseCurrency ? $total->getBaseTaxAmount() : $total->getTaxAmount();
$vatRate = 0;
- if ($taxAmount) {
+ if ($taxAmount && $amount) {
$vatRate = round(($taxAmount / $amount) * 100, 2);
}
$orderLines[] = [
Hi Frank,
Thanks for your suggention: && $amount still throws the error, but this works:
if ($taxAmount && $amount != 0) {
I just updated my code and I that I'm now redirected to Klarna. Thanks!
Hi @gerben86 ,
We are happy to share that we've just released the new 2.18.0 version where we have fixed this issue.
Thank you for opening this issue and for the detailed issue report.
We are closing this issue now but please feel free to reopen the issue if this still occurs.
Describe the bug When a customer tries to pay via Klarna I see this error in the system.log:
I don't see the error on the Mollie Dashboard and the status within Magento is 'Payment review'.
Used versions
Expected behavior Order just gets accepted by Mollie and Klarna. The order gets a status in which I can process the order.
Actual behavior Order not visible in Mollie Dashboard. An error in the system.log and the order has the status 'Payment review'
Screenshots