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

Closed
ga3003 opened this issue Nov 26, 2024 · 4 comments · Fixed by #2834
Closed

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

ga3003 opened this issue Nov 26, 2024 · 4 comments · Fixed by #2834
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?

@candemiralp
Copy link
Member

Hi @ga3003,

The ticket has been created and put to our backlog and it will be handled based on the priority. We haven't pulled that ticket to our sprint yet and current priority of this task is not high as this issue has not been reported by any other merchants yet.

If this patch is very urgent for you, I would encourage you to create a pull request to solve this. Then, our team can quickly review and release the patch.

Best Regards,
Can

@ga3003
Copy link
Author

ga3003 commented Jan 2, 2025

Thanks @candemiralp for fixing this issue. I will update module in our project.

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
2 participants