You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on implementing a custom requirement to track all PayByLink transactions in our Magento system. As part of this process, I call the capture API to capture the payment whenever we receive an authorization webhook. However, when the Capture webhook is triggered in Magento, the following error appears on the order details page:
"The order failed to update: Unable to find adyen_invoice linked to original reference XXXXXXXXXXXXXX, psp reference XXXXXXXXXXXXXX, and order 000032862. Cannot create an invoice."
Upon debugging, I found the issue is caused by the following lines of code:
In lines 291 and 292, the total amount used is base_grand_total, but the currency corresponds to the customer's order currency, not the base currency. As a result, when verifying whether the full payment has been completed, the system throws the error above.
I verified that after changing the $order->getBaseGrandTotal() to $order->getGrandTotal(), it solved the issue.
The text was updated successfully, but these errors were encountered:
candemiralp
changed the title
Issue while trying to capture the PayByLink from magento.
[ECP-9561] Issue while trying to capture the PayByLink from magento.
Nov 26, 2024
I am working on implementing a custom requirement to track all PayByLink transactions in our Magento system. As part of this process, I call the capture API to capture the payment whenever we receive an authorization webhook. However, when the Capture webhook is triggered in Magento, the following error appears on the order details page:
"The order failed to update: Unable to find adyen_invoice linked to original reference XXXXXXXXXXXXXX, psp reference XXXXXXXXXXXXXX, and order 000032862. Cannot create an invoice."
Upon debugging, I found the issue is caused by the following lines of code:
File path: vendor/adyen/module-payment/Helper/Invoice.php
In lines 291 and 292, the total amount used is base_grand_total, but the currency corresponds to the customer's order currency, not the base currency. As a result, when verifying whether the full payment has been completed, the system throws the error above.
I verified that after changing the $order->getBaseGrandTotal() to $order->getGrandTotal(), it solved the issue.
The text was updated successfully, but these errors were encountered: