{"action":"created","issue":{"url":"https://api.github.com/repos/elementary/website/issues/1455","repository_url":"https://api.github.com/repos/elementary/website","labels_url":"https://api.github.com/repos/elementary/website/issues/1455/labels{/name}","comments_url":"https://api.github.com/repos/elementary/website/issues/1455/comments","events_url":"https://api.github.com/repos/elementary/website/issues/1455/events","html_url":"https://github.com/elementary/website/issues/1455","id":185765629,"number":1455,"title":"Implement custom receipts for OS purchases.","user":{"login":"lewisgoddard","id":831389,"avatar_url":"https://avatars.githubusercontent.com/u/831389?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisgoddard","html_url":"https://github.com/lewisgoddard","followers_url":"https://api.github.com/users/lewisgoddard/followers","following_url":"https://api.github.com/users/lewisgoddard/following{/other_user}","gists_url":"https://api.github.com/users/lewisgoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisgoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisgoddard/subscriptions","organizations_url":"https://api.github.com/users/lewisgoddard/orgs","repos_url":"https://api.github.com/users/lewisgoddard/repos","events_url":"https://api.github.com/users/lewisgoddard/events{/privacy}","received_events_url":"https://api.github.com/users/lewisgoddard/received_events","type":"User","site_admin":false},"labels":[{"id":163622808,"url":"https://api.github.com/repos/elementary/website/labels/Needs%20Design","name":"Needs Design","color":"3892E0","default":false},{"id":412239762,"url":"https://api.github.com/repos/elementary/website/labels/Priority%20High","name":"Priority High","color":"EFB73E","default":false},{"id":164323346,"url":"https://api.github.com/repos/elementary/website/labels/Status%20Confirmed","name":"Status Confirmed","color":"F4F1A4","default":false}],"state":"open","locked":false,"assignee":{"login":"lewisgoddard","id":831389,"avatar_url":"https://avatars.githubusercontent.com/u/831389?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisgoddard","html_url":"https://github.com/lewisgoddard","followers_url":"https://api.github.com/users/lewisgoddard/followers","following_url":"https://api.github.com/users/lewisgoddard/following{/other_user}","gists_url":"https://api.github.com/users/lewisgoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisgoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisgoddard/subscriptions","organizations_url":"https://api.github.com/users/lewisgoddard/orgs","repos_url":"https://api.github.com/users/lewisgoddard/repos","events_url":"https://api.github.com/users/lewisgoddard/events{/privacy}","received_events_url":"https://api.github.com/users/lewisgoddard/received_events","type":"User","site_admin":false},"assignees":[{"login":"lewisgoddard","id":831389,"avatar_url":"https://avatars.githubusercontent.com/u/831389?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisgoddard","html_url":"https://github.com/lewisgoddard","followers_url":"https://api.github.com/users/lewisgoddard/followers","following_url":"https://api.github.com/users/lewisgoddard/following{/other_user}","gists_url":"https://api.github.com/users/lewisgoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisgoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisgoddard/subscriptions","organizations_url":"https://api.github.com/users/lewisgoddard/orgs","repos_url":"https://api.github.com/users/lewisgoddard/repos","events_url":"https://api.github.com/users/lewisgoddard/events{/privacy}","received_events_url":"https://api.github.com/users/lewisgoddard/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/elementary/website/milestones/5","html_url":"https://github.com/elementary/website/milestones/Total%20Automation","labels_url":"https://api.github.com/repos/elementary/website/milestones/5/labels","id":989663,"number":5,"title":"Total Automation","description":"The robots will rise.","creator":{"login":"lewisgoddard","id":831389,"avatar_url":"https://avatars.githubusercontent.com/u/831389?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisgoddard","html_url":"https://github.com/lewisgoddard","followers_url":"https://api.github.com/users/lewisgoddard/followers","following_url":"https://api.github.com/users/lewisgoddard/following{/other_user}","gists_url":"https://api.github.com/users/lewisgoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisgoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisgoddard/subscriptions","organizations_url":"https://api.github.com/users/lewisgoddard/orgs","repos_url":"https://api.github.com/users/lewisgoddard/repos","events_url":"https://api.github.com/users/lewisgoddard/events{/privacy}","received_events_url":"https://api.github.com/users/lewisgoddard/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":34,"state":"open","created_at":"2015-02-21T23:00:36Z","updated_at":"2016-10-27T20:18:03Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-10-27T19:59:46Z","updated_at":"2016-10-27T20:22:43Z","closed_at":null,"body":"- [ ] Add orders database.\r\n- [ ] Add API endpoint to set cookie like order happened in this browser.\r\n\r\n### onSuccessfulOrder\r\n\r\n- [ ] Add order ID to database, something long and semi-secret.\r\n- [ ] Send custom, responsive receipt through Mandrill.\r\n\r\n### onDownloadAgain\r\n\r\n- [ ] Hit `/api/download-again?order-id=SOMETHING_SECRET_AND_LONG`\r\n- [ ] Set the cookie.\r\n- [ ] Redirect to homepage, who is none the wiser and treats the user like they just ordered it.\r\n\r\n### References\r\n\r\n#### Ordered Cookie\r\n```\r\n// Set an insecure, HTTP only cookie for 10 years in the future.\r\n$encoded = urlencode(str_replace(' ', '_', 'has_paid_'.$description));\r\nsetcookie($encoded, $amount, time() + 315360000, '/', '', 0, 1);\r\n```\r\n[backend/payment.php, Line 23](https://github.com/elementary/website/blob/master/backend/payment.php#L23)"},"comment":{"url":"https://api.github.com/repos/elementary/website/issues/comments/256758101","html_url":"https://github.com/elementary/website/issues/1455#issuecomment-256758101","issue_url":"https://api.github.com/repos/elementary/website/issues/1455","id":256758101,"user":{"login":"lewisgoddard","id":831389,"avatar_url":"https://avatars.githubusercontent.com/u/831389?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisgoddard","html_url":"https://github.com/lewisgoddard","followers_url":"https://api.github.com/users/lewisgoddard/followers","following_url":"https://api.github.com/users/lewisgoddard/following{/other_user}","gists_url":"https://api.github.com/users/lewisgoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisgoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisgoddard/subscriptions","organizations_url":"https://api.github.com/users/lewisgoddard/orgs","repos_url":"https://api.github.com/users/lewisgoddard/repos","events_url":"https://api.github.com/users/lewisgoddard/events{/privacy}","received_events_url":"https://api.github.com/users/lewisgoddard/received_events","type":"User","site_admin":false},"created_at":"2016-10-27T20:22:43Z","updated_at":"2016-10-27T20:22:43Z","body":"So, working like we normally do, I set this up so it sends a super-dumb looking email with the link in that works, then #ux swoop in and make it sexy, seeing as they seem to approve the flow."}}
{"actor":{"display_login":"lewisgoddard"}}