Closed erwinschaap closed 2 years ago
HI @erwinschaap , I just tried to reproduce this but I can't break it on the latest Mollie release.
As we did some changes regarding the payment fees and the order processing in the latest release, can you please update the plugin to the latest version and try to reproduce this again?
@Frank-Magmodules Could you update the official plugin on the Magento Marketplace? It is outdated
HI @erwinschaap , the latest version is there now! https://marketplace.magento.com/mollie-magento2.html
@Frank-Magmodules We updated the module today but the fee is sometimes good but mostly not. (See screenshot) The following information in the request is not correct. You can see the mollie fee is zero but the grand total differs with subtotal. In this case the mollie payment fee should be 4,50 euro
I fixed it by saving the Quote
after setting the Mollie payment fee in Mollie\Payment\Model\PaymentFee\Quote\Address\Total\PaymentFee::collect
and Mollie\Payment\Model\PaymentFee\Quote\Address\Total\PaymentFeeTax::collect
/**
* @param Quote $quote
* @param ShippingAssignmentInterface $shippingAssignment
* @param Total $total
* @return $this|AbstractTotal
*/
public function collect(Quote $quote, ShippingAssignmentInterface $shippingAssignment, Total $total)
{
...
$attributes->setMolliePaymentFee($amount);
$attributes->setBaseMolliePaymentFee($result->getRoundedAmount());
$this->quoteResourceModel->save($quote);
return $this;
}
@dennisvanderweide Can you help us to add this correctly without getting a "main.CRITICAL: Exception: Notice: Undefined property: Mollie\Payment\Model\PaymentFee\Quote\Address\Total\PaymentFee::$quoteResourceModel" ?
@jorgb90 You need to add the Quote ResourceModel class as a dependency in the constructor
/**
* @var \Magento\Quote\Model\ResourceModel\Quote
*/
private $quoteResourceModel;
public function __construct(
PaymentFeeConfig $paymentFeeConfig,
PriceCurrencyInterface $priceCurrency,
Calculate $calculate,
\Magento\Quote\Model\ResourceModel\Quote $quoteResourceModel
) {
$this->paymentFeeConfig = $paymentFeeConfig;
$this->priceCurrency = $priceCurrency;
$this->calculate = $calculate;
$this->quoteResourceModel = $quoteResourceModel;
}
Hi All,
Saving the quote in the totals should not be required. If every total saves the quote the whole checkout will get slow easily. Most likely, something prevents the quote from being saved after the totals are processed.
Would it be possible to provide us with access to your environment so we can investigate this more?
HI @erwinschaap ,
Due to the lack of information and the fact that we can't reproduce this issue, we will close this issue for now. Please feel free to reopen the issue or contact us directly through our contact form so we can investigate this issue further with you.
Describe the bug This morning a customer paid via PayPal. We ask for a fee of 3% (configured). The customer for the entire amount but the order states that the customer has to pay the 3% fee.
Total Paid: for example: 100 euro Grand total : 103 euro In the Mollie logs: 103 euro Total due: 3 euro
Used versions Magento 2.4.3 Open Source Mollie version: v2.6.0
To Reproduce Steps to reproduce the behavior:
Expected behavior The customer does not have to pay extra surchage because it's already paid. There is no total due.
Actual behavior There is a total due of the total surcharge costs
Screenshots If applicable, add screenshots to help explain your problem.
Additional context No addition context