Closed ijozwiak closed 1 year ago
HI @ijozwiak , based on our investigation, this issue also appears to be related to the webhook firing faster than before, which results in an update before the order is saved into Magento and seems to created extra order lines as result.
To address this, we have implemented a solution that involves appending an encrypted order ID to the webhook URL. This will serve as a fallback in situations where the transaction ID is not found in Magento.
In such cases, we will compare the order ID from the metadata in the loaded transaction on the Mollie side and set the transaction ID to the order to process the webhook. This will ensure that the order is properly processed and any necessary actions are taken. This solution is now available within our new [2.22.0](https://github.com/mollie/magento2/releases/tag/v2.22.0) release.
We understand the importance of timely and accurate order processing and appreciate your patience as we work to resolve this issue. Please let us know if you have any further questions or concerns.
We are closing this issue now but please feel free to reopen the issue if this still occurs.
Description When I set in the configuration moment that the invoice should be created on the webhook with
status=authorized
,orders have one invoice correct and many with price of 0 euro.
In logs, I can find many entries with the same
status=authorized
.it causes because of many webhook responses with the same
mollie_transaction_id
and the samestatus=authorized
It can be related to this line: https://github.com/mollie/magento2/blob/master/Model/Client/Orders/Processors/SuccessfulPayment.php#L166
There is no verification if the invoice exists there we have only check if the status is authorized and invoice moment is set on the same step/point and that's all
Used versions
Expected behavior Only one invoice should be created, when payment is successful.
Actual behavior Orders have one invoice correct and many with price of 0 euro.
Screenshots![image](https://user-images.githubusercontent.com/26056813/215030415-da1bc079-b136-491f-9604-f461cb71ac14.png)
Similar issue https://github.com/mollie/magento2/issues/604