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

Connection between transaction_id and magento order id lost after multiple payment tries #773

Closed
patricksteenks opened this issue Apr 23, 2024 · 11 comments
Assignees
Labels
Help wanted Extra information or help is needed for this issue. Released

Comments

@patricksteenks
Copy link

Describe the bug
We have a problem with some payments through iDeal or Paypal payment methods. The problems seem to have appeared/increased since april 15th, when we switched to magento 2.4.6-p5 open source.

There are some orders in magento which get a payment failed/cancelled status. When searching for these orders in Mollie, we see multiple payment start by a customer (usually 3), of which two fail and one succeeds.

However, the transaction_id of the succeeded payment is not linked to the magento order. In stead, this one still refers to the failed order. After a while the order is cancelled, because the payment on this transaction_id failed. This is not correct, as the customer has paid through mollie on a different transaction_id.

Used versions

  • Magento 2.4.6-p5 Open source
  • Mollie 2.36.0

To Reproduce
Steps to reproduce the behavior:

  1. Check order in magento and check transaction id
  2. See status "cancelled" because of payment not received
  3. Check order in Mollie: several payment attempts, one transaction succeed
  4. Compare transaction_id with transaction_id in magento = different

Expected behavior
Each order that is successfully paid through mollie should be getting the correct status in magento

Actual behavior
Some orders that are successfully paid, are not updated correctly in magento.

Screenshots
Because of privacy concerns we can not share the order and transaction id's here, but are happy to share them through mail.

@Sental
Copy link
Contributor

Sental commented Apr 30, 2024

I am intermittently seeing this with orders created using the payment links as well.

@patricksteenks
Copy link
Author

Is there any news on this? Is this investigated already?

@Frank-Magmodules
Copy link
Collaborator

Hello @patricksteenks and @Sental, we couldn't reproduce this issue directly, but we're still actively investigating, especially regarding your observation about it occurring since the Magento version update. I'll provide a follow-up shortly as this is a priority on our list.

@Frank-Magmodules
Copy link
Collaborator

HI here @patricksteenks and @Sental , can you please share environment details and/or logs regarding this, so we can take a look with you? As it seems we are unable to reproduce it atm.

@Frank-Magmodules Frank-Magmodules added the Investigating We are working on this issue together with the customer. label May 2, 2024
@Sental
Copy link
Contributor

Sental commented May 2, 2024

@Frank-Magmodules Unfortunately there aren't any logs from the magento side for this problem but you should be able to recreate following these steps.

  1. create an order in the magento admin with the payment link payment method.
  2. Open the recieved link and then fail to sucessfuly pay for the order.
  3. try a second time to pay for the order using the same link and complete the payment.

The payment in mollie should then have a different transaction id to the one in the magento system. Meaning the link between the order & the mollie payment is broken and the transaction id of the paid order in mollie doesn't exist in magento and the magento order is left on pending payment.

I did also ask mollie support, their current answer is the only way to solve this is manually marking the order in magento as paid.

@patricksteenks
Copy link
Author

I will do my best to share. But I agree with Mark, there aren't any concrete logs in magento that I can share. Except that I see in mollie that for each payment attempt new transaction_ids are created, which lead to a disconnect between the store transaction id in magento and the one in mollie. Because of the loss of this link, the transaction can not be updated in magento.

@patricksteenks
Copy link
Author

Upon further examination I see in the orders that the first redirect to mollie after an order leads to a successfull payment. In the magento logs I see some minutes later that the customer is again lead to mollie, but that payment is not completed.

In magento after this second redirect to mollie, a new mollie transaction_id is connected to the order. But as this payment is not completed, the next day the order gets status cancelled.

Why is the customer redirecting to mollie after a successfull payment? I can provide you with the logs in a personal message @Frank-Magmodules

@Frank-Magmodules
Copy link
Collaborator

Hey @patricksteenks, thanks for your message. With input from @Sental, we've made good progress in tackling this issue. It's likely to be addressed in the upcoming release, which is currently in the manual Q&A testing phase. Once I can confirm it's sorted, I'll get back to you promptly. Thanks for your patience, again!

michielgerritsen added a commit to michielgerritsen/mollie-magento2 that referenced this issue May 14, 2024
@Frank-Magmodules
Copy link
Collaborator

Hi There!

We just released a new version that addresses the bugs mentioned in this issue. Especially the comment from @Sental was very helpful, as it made the issue reproducible.

It turned out that resuming an older existing transaction or order could sometimes throw an error, which resulted in various other bugs. These bugs are now solved, and the transaction ID is updated when a new transaction is started.

We know for sure that the issue from @Sental should be fixed now. We think that the issue for @patricksteenks is also solved, but as we are unable to reproduce this issue it’s hard to say if this is really the case.

We would love your feedback on this! I will leave the issue open till you both confirm it's all alright now.
Thanks people!

@Frank-Magmodules Frank-Magmodules added Help wanted Extra information or help is needed for this issue. Released and removed Investigating We are working on this issue together with the customer. labels May 16, 2024
@patricksteenks
Copy link
Author

Hey @patricksteenks, thanks for your message. With input from @Sental, we've made good progress in tackling this issue. It's likely to be addressed in the upcoming release, which is currently in the manual Q&A testing phase. Once I can confirm it's sorted, I'll get back to you promptly. Thanks for your patience, again!

Nice to hear! Sounds like this resolves our issue as well. I'll push it to our live environment and keep you posted.

@Frank-Magmodules
Copy link
Collaborator

Perfect, @Sental and @patricksteenks , Assuming everything went well, I'll close the issue for now. However, feel free to respond or reopen it if needed. Thank you for your cooperation and patience @patricksteenks and @Sental !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Extra information or help is needed for this issue. Released
Projects
None yet
Development

No branches or pull requests

3 participants