{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay/issues/13","repository_url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay","labels_url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay/issues/13/comments","events_url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay/issues/13/events","html_url":"https://github.com/thephpleague/omnipay-multisafepay/issues/13","id":181730713,"number":13,"title":"isSuccessful() should check for presence of timestamp","user":{"login":"elwin1234","id":3977962,"avatar_url":"https://avatars.githubusercontent.com/u/3977962?v=3","gravatar_id":"","url":"https://api.github.com/users/elwin1234","html_url":"https://github.com/elwin1234","followers_url":"https://api.github.com/users/elwin1234/followers","following_url":"https://api.github.com/users/elwin1234/following{/other_user}","gists_url":"https://api.github.com/users/elwin1234/gists{/gist_id}","starred_url":"https://api.github.com/users/elwin1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elwin1234/subscriptions","organizations_url":"https://api.github.com/users/elwin1234/orgs","repos_url":"https://api.github.com/users/elwin1234/repos","events_url":"https://api.github.com/users/elwin1234/events{/privacy}","received_events_url":"https://api.github.com/users/elwin1234/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-07T17:56:06Z","updated_at":"2016-11-22T08:38:47Z","closed_at":null,"body":"Hallo / Hello,\n\nConsider the class RestCompletePurchaseResponse\n\n```\nclass RestCompletePurchaseResponse extends RestFetchTransactionResponse\n{\n    /**\n     * {@inheritdoc}\n     */\n    public function isSuccessful()\n    {\n        return $this->getPaymentStatus() == 'completed';\n    }\n}\n```\n\nand the `getPaymentStatus()` function in `RestFetchTransactionResponse`\n\n```\n    /**\n     * Get raw payment status.\n     *\n     * @return null|string\n     */\n    public function getPaymentStatus()\n    {\n        if (isset($this->data['data']['status'])) {\n            return $this->data['data']['status'];\n        }\n    }\n```\n\nAt this moment the payment is considered successful when the status is \"completed\". However, sometimes the PSP MultiSafepay sends two `notifyMerchantTrans` requests to the webshop with very little time in between. I contacted MSP about this behaviour and they told me that status updates that do not contain a timestamp should be ignored. I checked some 'double requests' and concluded that the first of the two request does not contain a `timestamp` in the returning parameter bag. So in order to preserve that the webshop is starting two parallel order finishing steps because the two requests are placed so close after another is it possible to implement a timestamp check?\n"},"comment":{"url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay/issues/comments/262179451","html_url":"https://github.com/thephpleague/omnipay-multisafepay/issues/13#issuecomment-262179451","issue_url":"https://api.github.com/repos/thephpleague/omnipay-multisafepay/issues/13","id":262179451,"user":{"login":"lukeholder","id":133571,"avatar_url":"https://avatars.githubusercontent.com/u/133571?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeholder","html_url":"https://github.com/lukeholder","followers_url":"https://api.github.com/users/lukeholder/followers","following_url":"https://api.github.com/users/lukeholder/following{/other_user}","gists_url":"https://api.github.com/users/lukeholder/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeholder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeholder/subscriptions","organizations_url":"https://api.github.com/users/lukeholder/orgs","repos_url":"https://api.github.com/users/lukeholder/repos","events_url":"https://api.github.com/users/lukeholder/events{/privacy}","received_events_url":"https://api.github.com/users/lukeholder/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T08:38:47Z","updated_at":"2016-11-22T08:38:47Z","body":"@elwin1234 any update on this? Can you paste the MSP conversation?"}}
{"actor":{"display_login":"lukeholder"}}