{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/support-frontend/issues/786","repository_url":"https://api.github.com/repos/guardian/support-frontend","labels_url":"https://api.github.com/repos/guardian/support-frontend/issues/786/labels{/name}","comments_url":"https://api.github.com/repos/guardian/support-frontend/issues/786/comments","events_url":"https://api.github.com/repos/guardian/support-frontend/issues/786/events","html_url":"https://github.com/guardian/support-frontend/pull/786","id":340960825,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMjQ2MDY2","number":786,"title":"Show paypal payment with \"PAYMENT_ALREADY_DONE\" as successful","user":{"login":"michaelwmcnamara","id":7239344,"node_id":"MDQ6VXNlcjcyMzkzNDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7239344?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelwmcnamara","html_url":"https://github.com/michaelwmcnamara","followers_url":"https://api.github.com/users/michaelwmcnamara/followers","following_url":"https://api.github.com/users/michaelwmcnamara/following{/other_user}","gists_url":"https://api.github.com/users/michaelwmcnamara/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwmcnamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwmcnamara/subscriptions","organizations_url":"https://api.github.com/users/michaelwmcnamara/orgs","repos_url":"https://api.github.com/users/michaelwmcnamara/repos","events_url":"https://api.github.com/users/michaelwmcnamara/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwmcnamara/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-13T10:09:32Z","updated_at":"2018-07-19T10:08:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/guardian/support-frontend/pulls/786","html_url":"https://github.com/guardian/support-frontend/pull/786","diff_url":"https://github.com/guardian/support-frontend/pull/786.diff","patch_url":"https://github.com/guardian/support-frontend/pull/786.patch"},"body":"Currently there are a significant number of payment attempts that seem to be duplicated. \r\nWe suspect this is caused by the contributors browser sending the execute payment command twice - perhaps because the response from the first attempt did not reach the browser.\r\nWhen this happens, Paypal processes the payment on receipt of the first the execute command and then responds to the second execute command with a \"PAYMENT_ALREADY_DONE\" error.\r\nThis means that from the contributors perspective it looks like the payment has failed and this risks them making a second payment if they re-attempt it.\r\n\r\nAs we have updated Payment API to send the error details of any payment error back to support frontend, this change will inspect the contents of any error and if the error is a PAYMENT_ALREADY_DONE error, it will send the user to the thank you page so that they do not get the impression their payment didn't go through.\r\n\r\nThis will guard the user from mistakenly double-paying.\r\n"},"comment":{"url":"https://api.github.com/repos/guardian/support-frontend/issues/comments/406225852","html_url":"https://github.com/guardian/support-frontend/pull/786#issuecomment-406225852","issue_url":"https://api.github.com/repos/guardian/support-frontend/issues/786","id":406225852,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjIyNTg1Mg==","user":{"login":"michaelwmcnamara","id":7239344,"node_id":"MDQ6VXNlcjcyMzkzNDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7239344?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelwmcnamara","html_url":"https://github.com/michaelwmcnamara","followers_url":"https://api.github.com/users/michaelwmcnamara/followers","following_url":"https://api.github.com/users/michaelwmcnamara/following{/other_user}","gists_url":"https://api.github.com/users/michaelwmcnamara/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwmcnamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwmcnamara/subscriptions","organizations_url":"https://api.github.com/users/michaelwmcnamara/orgs","repos_url":"https://api.github.com/users/michaelwmcnamara/repos","events_url":"https://api.github.com/users/michaelwmcnamara/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwmcnamara/received_events","type":"User","site_admin":false},"created_at":"2018-07-19T10:08:32Z","updated_at":"2018-07-19T10:08:32Z","author_association":"CONTRIBUTOR","body":"Just waiting on https://github.com/guardian/support-frontend/pull/793 then I will merge master and this will be ready to go."}}
{"actor":{"display_login":"michaelwmcnamara"}}