mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
98 stars 49 forks source link

Transaction ID missing for orders with Mollie: Payment Link payment method #770

Closed nkikkertyouwe closed 1 month ago

nkikkertyouwe commented 2 months ago

Describe the bug When creating an order using the "Mollie: Payment Link" payment method through the admin, the Transaction ID is not saved for the order (the field mollie_transaction_id in the sales_order table is null).

Used versions

To Reproduce Steps to reproduce the behavior:

  1. Create an order through the admin (Customers -> All Customers -> [Select customer] -> Create order)
  2. Select one or multiple items and fill in the address details if needed
  3. Select "Mollie: Payment Link" payment method
  4. Choose any Shipping Method and click on "Submit Order"
  5. In the order details view in the admin, click on "Fetch Status", notice the error "Transaction ID not found":

Expected behavior The Transaction ID is saved for the order, and the latest status can be retrieved by clicking on the "Fetch Status" button.

Actual behavior An error message "Transaction ID not found" is shown, as the Transaction ID is not saved for the order when the order is created.

Screenshots -000000153-Orders-Operations-Sales-Magento-Admin

Additional context This works correctly until version 2.31.0

Frank-Magmodules commented 2 months ago

Hi There @nkikkertyouwe ,

Thank you for opening this issue. The payment link method works differently than let’s say iDeal. With payment link orders, the transaction isn’t created until the customer opens the “click here to pay” link in the order confirmation email or through the backend link.

Due to this, there is no transaction ID available up until that point. In an upcoming version, we will change this button to something that makes this difference more clear. I will leave this issue open till then!

nkikkertyouwe commented 2 months ago

Hi @Frank-Magmodules, thanks for your reply. I am aware that this payment link method works differently than the other "pay immediately" payment methods like iDEAL, but I do see that in the v2.31.0 version, the Transaction ID is created immediately for these orders, even though the customer did not click on the link yet.

In 2.31.0 I see this in the admin for an example order: image

As you can see, the link to the checkout URL already contains the mollie_transaction_id: ord_1.pgg79p This is different than in 2.36.0, where it only says "Click here to pay".

nkikkertyouwe commented 1 month ago

Hi @Frank-Magmodules, did you check out my latest question? Just want to make sure we're talking about the same issue.

Frank-Magmodules commented 1 month ago

Hi @nkikkertyouwe,

Apologies for the delayed reply. Yes, we are aware that this behavior is different in the latest versions compared to earlier versions. This is intended and solve a few issues that existed with the payment link.

In earlier versions, the transaction is created directly within Mollie, while in later versions this is not the case. There is the creation of the transaction postponed to the moment the customer clicks on the “pay now” link.

Frank-Magmodules commented 1 month ago

Hi There @nkikkertyouwe , we have just released a new version of the plugin where we've added this as an improvement, it now indicates that the payment has not started yet and therefore there is no TransactionID available yet. I'm closing this issue for now. Thanks again!