Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9561] Issue while trying to capture the PayByLink from magento. #2816

Open
ga3003 opened this issue Nov 26, 2024 · 2 comments
Open

[ECP-9561] Issue while trying to capture the PayByLink from magento. #2816

ga3003 opened this issue Nov 26, 2024 · 2 comments
Assignees
Labels
Bug report Indicates that issue has been marked as a possible bug

Comments

@ga3003
Copy link

ga3003 commented 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:

image

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.

@ga3003 ga3003 added the Bug report Indicates that issue has been marked as a possible bug label Nov 26, 2024
@candemiralp 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
@candemiralp candemiralp self-assigned this Nov 26, 2024
@candemiralp
Copy link
Member

Hello @ga3003,

Thank you for creating this issue and providing detailed explanation of the issue. We have created an internal ticket to solve this issue.

Best Regards,
Can

@ga3003
Copy link
Author

ga3003 commented Nov 28, 2024

Hi @candemiralp, Is there any update on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

No branches or pull requests

2 participants