{"action":"created","issue":{"url":"https://api.github.com/repos/mollie/Magento/issues/66","repository_url":"https://api.github.com/repos/mollie/Magento","labels_url":"https://api.github.com/repos/mollie/Magento/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/mollie/Magento/issues/66/comments","events_url":"https://api.github.com/repos/mollie/Magento/issues/66/events","html_url":"https://github.com/mollie/Magento/issues/66","id":282138439,"number":66,"title":"Always redirected to checkout/onepage/success when returning from mollie pay page","user":{"login":"edwinljacobs","id":11278380,"avatar_url":"https://avatars2.githubusercontent.com/u/11278380?v=4","gravatar_id":"","url":"https://api.github.com/users/edwinljacobs","html_url":"https://github.com/edwinljacobs","followers_url":"https://api.github.com/users/edwinljacobs/followers","following_url":"https://api.github.com/users/edwinljacobs/following{/other_user}","gists_url":"https://api.github.com/users/edwinljacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/edwinljacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwinljacobs/subscriptions","organizations_url":"https://api.github.com/users/edwinljacobs/orgs","repos_url":"https://api.github.com/users/edwinljacobs/repos","events_url":"https://api.github.com/users/edwinljacobs/events{/privacy}","received_events_url":"https://api.github.com/users/edwinljacobs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-14T15:27:16Z","updated_at":"2018-02-22T12:23:40Z","closed_at":"2018-02-22T12:23:40Z","author_association":"NONE","body":"When a customer visits the mollie pay page (https://prnt.sc/hngthl) for a given payment method and decided to cancel the transaction. Then the ApiControllers returnAction method is invoked.\r\n\r\nWe find at line number 376:\r\n\r\n// Get payment status from database ( `mollie_payments` )\r\n\t\t\t\t$oStatus = Mage::helper('mpm')->getStatusById($transactionId);\r\nThis status object is then checked as follows:\r\nempty($oStatus['updated_at'] ) || $oStatus['bank_status'] === Mollie_Mpm_Model_Api::STATUS_PAID || $oStatus['bank_status'] === Mollie_Mpm_Model_Api::STATUS_PENDING)\r\n\r\nWhen returning from mollie the following condition is true when the user decides to cancel the transaction\r\n$oStatus['bank_status'] === Mollie_Mpm_Model_Api::STATUS_PENDING\r\n\r\nWhen using mollies test environment this condition is also true when the user completes the transaction.\r\nso it seems the no matter how the transaction unfolds it holds that\r\n\r\n$oStatus['bank_status'] === Mollie_Mpm_Model_Api::STATUS_PENDING\r\nwhen returning from mollie.\r\n\r\nThe issue is that there is no way to know in the returnAction method if the user decided to cancel the transaction. Later on in the returnAction method the user gets redirected to the success page, triggering all kinds analytics events that should only be registered for completed orders.\r\n\r\nI checked which params are available when entering the method returnAction its just the order id and utm_nooverride=1. We want to be able to redirect the user to a different page if he or she decided to cancel the transaction (maybe back to the cart). \r\n"},"comment":{"url":"https://api.github.com/repos/mollie/Magento/issues/comments/367664604","html_url":"https://github.com/mollie/Magento/issues/66#issuecomment-367664604","issue_url":"https://api.github.com/repos/mollie/Magento/issues/66","id":367664604,"user":{"login":"Marvin-Magmodules","id":20815641,"avatar_url":"https://avatars0.githubusercontent.com/u/20815641?v=4","gravatar_id":"","url":"https://api.github.com/users/Marvin-Magmodules","html_url":"https://github.com/Marvin-Magmodules","followers_url":"https://api.github.com/users/Marvin-Magmodules/followers","following_url":"https://api.github.com/users/Marvin-Magmodules/following{/other_user}","gists_url":"https://api.github.com/users/Marvin-Magmodules/gists{/gist_id}","starred_url":"https://api.github.com/users/Marvin-Magmodules/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marvin-Magmodules/subscriptions","organizations_url":"https://api.github.com/users/Marvin-Magmodules/orgs","repos_url":"https://api.github.com/users/Marvin-Magmodules/repos","events_url":"https://api.github.com/users/Marvin-Magmodules/events{/privacy}","received_events_url":"https://api.github.com/users/Marvin-Magmodules/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T12:23:40Z","updated_at":"2018-02-22T12:23:40Z","author_association":"COLLABORATOR","body":"This part has been completely rewritten in [4.4.0-Beta](https://github.com/mollie/Magento/releases/tag/v4.4.0). Cancelation results in a redirect to the cart instead of the checkout success. "}}
{"actor":{"display_login":"Marvin-Magmodules"}}