PAYONE-GmbH / magento-2

PAYONE Payment Extension for Magento 2
28 stars 56 forks source link

Additional cancelled order after successful payment using iDeal #333

Closed blanioo closed 3 years ago

blanioo commented 4 years ago

Steps to reproduce:

  1. Go to checkout and select iDeal as a payment method
  2. Click on place order button and get redirected to iDeal payment portal
  3. Click 'back' button in a browser (right after payment portal page loaded)
  4. Get redirected to first step of checkout - then complete order using iDeal
  5. Success page appear with order ID
  6. Go to Magento admin panel
  7. There are 2 orders with the same amount, the same items and for the same customer, but one is cancelled and second one is pending/processing

Actual:

Expected:

T-Kuchel commented 4 years ago

Hi @blanioo ,

the actual behavior you described is caused of the fact that we redirect to the ideal page and at this moment we had to persist the order. When there is occurring any problem (i.e. because the customer clicks on the back button), we cancel the order. When the customer decides to check out again, we also persist a new order, and to prevent gaps in the ordernumber-range we do not delete the 'old' attempt. That behavior was an explicit requirement from many customers, to have the chance to comprehend what happened there.

Hopefully that helps you.

Greetings from Kiel Timo

blanioo commented 4 years ago

Hi @T-Kuchel ,

Thanks for explanation, but I think I found one thing about this functionality - when use "back" button and after this "forward" it results that cancelled order and second pending/processing has the same TXID

Steps to reproduce:

  1. Go to checkout and select iDeal as a payment method
  2. Click on place order button and get redirected to iDeal payment portal
  3. Click 'back' button in a browser (right after payment portal page loaded)
  4. Get redirected to first step of checkout
  5. Click 'forward' button in a browser and complete iDeal payment
  6. Success page appear with order ID
  7. Go to Magento admin panel
  8. Both cancelled and pending/processing order has the same TXID

In comparison to reproduction path from my first message where TXID are different for both cancelled and success order, in above reproduction path TXID are the same for both orders, is this correct behaviour in both cases?

gthrn commented 4 years ago

Related to this issue I am also experiencing strange behaviour with Ideal Payments. I also get 2 Orders, which appears to be the expected behaviour as I read in the first answer.

But the Reference, that is passed by Payone, contains the first (canceled) Order-ID. This leads to issues in matching payments to orders. Since we have an approved Order without a Payment reference, but a payed order which has been canceled.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hreinberger commented 3 years ago

Hi all, browser-button usage during redirect payments can be really tricky due to the magento internals @T-Kuchel outlined above. When a customer uses the back button during a redirect checkout, the initial order is canceled and a new, identical one is created. When the customer then uses the forward-button again, he or she actually uses the same iDeal session for the checkout, which is why there is no new txid and therefore no new reference for the txid.

We try to make this as transparent as possible in our order table in magento: grafik

We tried to make the checkout as seamless as possible for the customers here but have to work around some of the inner workings of magento.

So all in all yes, the behavior you reported is expected, but not very pretty. We're open for suggestions though, so if you want to provide more feedback or want to talk through alternatives, feel free to open a new issue. I'm closing this since it's already stale.