RBech / QuickPay_Magento2

Magento2 Extension for the QuickPay payment service provider
Open Software License 3.0
2 stars 3 forks source link

Address is reset after payment is cancelled #3

Open wintermute-84 opened 7 years ago

wintermute-84 commented 7 years ago

After payment is interrupted and user is redirected back to the checkout, address is empty. Any idea where to look for the solution to this problem?

Thanks

k4emic commented 6 years ago

I did some digging into this, and while the quote is restored properly in the backend (including the address), the information is never put into the localstorage, so the form is simply populated with empty fields.

In order to fix this, the localstorage must be repopulated with relevant data before the shipping form is rendered. This would (although this won't be easy) preferably be done through the models knockout models, or alternatively by saving a copy of the localstorage before it is cleared by the magento checkout, and restoring it if/when the user decides to cancel the payment.

We decided to change the fragment for the redirect location in Controller/Payment/CancelAction.php to the shipping step in order to avoid confusing the users.

wintermute-84 commented 6 years ago

Thanks for the reply. Magento acknowledged the bug and it is still present even in 2.3: https://github.com/magento/magento2/issues/11247#issuecomment-338916416

We are trying to fix this ourselves as well, lets hope we are going to have more time for this then magento. Will post solution here as well, when it's found.

RBech commented 6 years ago

@k4emic Thank you for your detective work! I think the best way forward for now is to do what you have done and redirect to the shipping step, any chance you could do a pull request for that?

Thanks in advance