{"action":"created","comment":{"url":"https://api.github.com/repos/Wizcorp/node-iap/pulls/comments/187227811","pull_request_review_id":118964634,"id":187227811,"diff_hunk":"@@ -7,6 +7,24 @@ var apiUrl = {\n \tproduction: 'https://apipub.roku.com/listen/transaction-service.svc/validate-transaction'\n };\n \n+function parseResult(resultString) {\n+\tvar result = JSON.parse(resultString);\n+\n+\t// parse non-standard date properties (i.e. /Date(1483242628000-0800)/)\n+\t// in order to extract value by milliseconds\n+\tresult.expirationDate = new Date(parseInt(result.expirationDate.substr(6), 10)).getTime();","path":"lib/roku/index.js","position":9,"original_position":9,"commit_id":"89ca156bc53fb2a68b09d1cde269c02eaf9caac4","original_commit_id":"89ca156bc53fb2a68b09d1cde269c02eaf9caac4","user":{"login":"superandrew213","id":13059204,"avatar_url":"https://avatars3.githubusercontent.com/u/13059204?v=4","gravatar_id":"","url":"https://api.github.com/users/superandrew213","html_url":"https://github.com/superandrew213","followers_url":"https://api.github.com/users/superandrew213/followers","following_url":"https://api.github.com/users/superandrew213/following{/other_user}","gists_url":"https://api.github.com/users/superandrew213/gists{/gist_id}","starred_url":"https://api.github.com/users/superandrew213/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superandrew213/subscriptions","organizations_url":"https://api.github.com/users/superandrew213/orgs","repos_url":"https://api.github.com/users/superandrew213/repos","events_url":"https://api.github.com/users/superandrew213/events{/privacy}","received_events_url":"https://api.github.com/users/superandrew213/received_events","type":"User","site_admin":false},"body":"I didn't add this part or changed how the dates are handled for Roku. I just moved it over to`parseResult` function and added the already existing`purchaseDate` and `expirationDate` to root of object.","created_at":"2018-05-10T02:45:10Z","updated_at":"2018-05-10T02:45:10Z","html_url":"https://github.com/Wizcorp/node-iap/pull/40#discussion_r187227811","pull_request_url":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Wizcorp/node-iap/pulls/comments/187227811"},"html":{"href":"https://github.com/Wizcorp/node-iap/pull/40#discussion_r187227811"},"pull_request":{"href":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40"}},"in_reply_to_id":187221038},"pull_request":{"url":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40","id":176367279,"html_url":"https://github.com/Wizcorp/node-iap/pull/40","diff_url":"https://github.com/Wizcorp/node-iap/pull/40.diff","patch_url":"https://github.com/Wizcorp/node-iap/pull/40.patch","issue_url":"https://api.github.com/repos/Wizcorp/node-iap/issues/40","number":40,"state":"open","locked":false,"title":"Add more common fields","user":{"login":"superandrew213","id":13059204,"avatar_url":"https://avatars3.githubusercontent.com/u/13059204?v=4","gravatar_id":"","url":"https://api.github.com/users/superandrew213","html_url":"https://github.com/superandrew213","followers_url":"https://api.github.com/users/superandrew213/followers","following_url":"https://api.github.com/users/superandrew213/following{/other_user}","gists_url":"https://api.github.com/users/superandrew213/gists{/gist_id}","starred_url":"https://api.github.com/users/superandrew213/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superandrew213/subscriptions","organizations_url":"https://api.github.com/users/superandrew213/orgs","repos_url":"https://api.github.com/users/superandrew213/repos","events_url":"https://api.github.com/users/superandrew213/events{/privacy}","received_events_url":"https://api.github.com/users/superandrew213/received_events","type":"User","site_admin":false},"body":"Added common fields `purchaseDate` and `expirationDate`.\r\n\r\nPlease test. Especially Roku and Amazon. I have not tested them because I am not using them but thought might add them too.\r\n\r\nRegarding issue https://github.com/Wizcorp/node-iap/issues/37: I am ignoring status `21006` and passing response through. Let me know if you want to handle this any other way.\r\n\r\nMaybe we could add some other common fields? It would be nice to have a `status` field for subscriptions that can be `active`, `expired` or `cancelled`. I'm not sure if we can determine cancelled status for all platform.","created_at":"2018-03-21T02:01:52Z","updated_at":"2018-05-10T02:45:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3bd66a2826151f65eecd798b8b6c8c2f5f40f60","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":924810898,"url":"https://api.github.com/repos/Wizcorp/node-iap/labels/breaking-change","name":"breaking-change","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40/commits","review_comments_url":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40/comments","review_comment_url":"https://api.github.com/repos/Wizcorp/node-iap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wizcorp/node-iap/issues/40/comments","statuses_url":"https://api.github.com/repos/Wizcorp/node-iap/statuses/89ca156bc53fb2a68b09d1cde269c02eaf9caac4","head":{"label":"superandrew213:add-more-common-fields","ref":"add-more-common-fields","sha":"89ca156bc53fb2a68b09d1cde269c02eaf9caac4","user":{"login":"superandrew213","id":13059204,"avatar_url":"https://avatars3.githubusercontent.com/u/13059204?v=4","gravatar_id":"","url":"https://api.github.com/users/superandrew213","html_url":"https://github.com/superandrew213","followers_url":"https://api.github.com/users/superandrew213/followers","following_url":"https://api.github.com/users/superandrew213/following{/other_user}","gists_url":"https://api.github.com/users/superandrew213/gists{/gist_id}","starred_url":"https://api.github.com/users/superandrew213/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superandrew213/subscriptions","organizations_url":"https://api.github.com/users/superandrew213/orgs","repos_url":"https://api.github.com/users/superandrew213/repos","events_url":"https://api.github.com/users/superandrew213/events{/privacy}","received_events_url":"https://api.github.com/users/superandrew213/received_events","type":"User","site_admin":false},"repo":{"id":126030718,"name":"node-iap","full_name":"superandrew213/node-iap","owner":{"login":"superandrew213","id":13059204,"avatar_url":"https://avatars3.githubusercontent.com/u/13059204?v=4","gravatar_id":"","url":"https://api.github.com/users/superandrew213","html_url":"https://github.com/superandrew213","followers_url":"https://api.github.com/users/superandrew213/followers","following_url":"https://api.github.com/users/superandrew213/following{/other_user}","gists_url":"https://api.github.com/users/superandrew213/gists{/gist_id}","starred_url":"https://api.github.com/users/superandrew213/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superandrew213/subscriptions","organizations_url":"https://api.github.com/users/superandrew213/orgs","repos_url":"https://api.github.com/users/superandrew213/repos","events_url":"https://api.github.com/users/superandrew213/events{/privacy}","received_events_url":"https://api.github.com/users/superandrew213/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/superandrew213/node-iap","description":"In-app purchase validation for Apple, Google, Amazon, Roku","fork":true,"url":"https://api.github.com/repos/superandrew213/node-iap","forks_url":"https://api.github.com/repos/superandrew213/node-iap/forks","keys_url":"https://api.github.com/repos/superandrew213/node-iap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superandrew213/node-iap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superandrew213/node-iap/teams","hooks_url":"https://api.github.com/repos/superandrew213/node-iap/hooks","issue_events_url":"https://api.github.com/repos/superandrew213/node-iap/issues/events{/number}","events_url":"https://api.github.com/repos/superandrew213/node-iap/events","assignees_url":"https://api.github.com/repos/superandrew213/node-iap/assignees{/user}","branches_url":"https://api.github.com/repos/superandrew213/node-iap/branches{/branch}","tags_url":"https://api.github.com/repos/superandrew213/node-iap/tags","blobs_url":"https://api.github.com/repos/superandrew213/node-iap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superandrew213/node-iap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superandrew213/node-iap/git/refs{/sha}","trees_url":"https://api.github.com/repos/superandrew213/node-iap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superandrew213/node-iap/statuses/{sha}","languages_url":"https://api.github.com/repos/superandrew213/node-iap/languages","stargazers_url":"https://api.github.com/repos/superandrew213/node-iap/stargazers","contributors_url":"https://api.github.com/repos/superandrew213/node-iap/contributors","subscribers_url":"https://api.github.com/repos/superandrew213/node-iap/subscribers","subscription_url":"https://api.github.com/repos/superandrew213/node-iap/subscription","commits_url":"https://api.github.com/repos/superandrew213/node-iap/commits{/sha}","git_commits_url":"https://api.github.com/repos/superandrew213/node-iap/git/commits{/sha}","comments_url":"https://api.github.com/repos/superandrew213/node-iap/comments{/number}","issue_comment_url":"https://api.github.com/repos/superandrew213/node-iap/issues/comments{/number}","contents_url":"https://api.github.com/repos/superandrew213/node-iap/contents/{+path}","compare_url":"https://api.github.com/repos/superandrew213/node-iap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superandrew213/node-iap/merges","archive_url":"https://api.github.com/repos/superandrew213/node-iap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superandrew213/node-iap/downloads","issues_url":"https://api.github.com/repos/superandrew213/node-iap/issues{/number}","pulls_url":"https://api.github.com/repos/superandrew213/node-iap/pulls{/number}","milestones_url":"https://api.github.com/repos/superandrew213/node-iap/milestones{/number}","notifications_url":"https://api.github.com/repos/superandrew213/node-iap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superandrew213/node-iap/labels{/name}","releases_url":"https://api.github.com/repos/superandrew213/node-iap/releases{/id}","deployments_url":"https://api.github.com/repos/superandrew213/node-iap/deployments","created_at":"2018-03-20T14:30:08Z","updated_at":"2018-03-20T14:30:09Z","pushed_at":"2018-05-01T02:33:20Z","git_url":"git://github.com/superandrew213/node-iap.git","ssh_url":"git@github.com:superandrew213/node-iap.git","clone_url":"https://github.com/superandrew213/node-iap.git","svn_url":"https://github.com/superandrew213/node-iap","homepage":"","size":102,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Wizcorp:master","ref":"master","sha":"5132917c861a1c4e5afcbfaa8859aa812bcb27f1","user":{"login":"Wizcorp","id":592346,"avatar_url":"https://avatars2.githubusercontent.com/u/592346?v=4","gravatar_id":"","url":"https://api.github.com/users/Wizcorp","html_url":"https://github.com/Wizcorp","followers_url":"https://api.github.com/users/Wizcorp/followers","following_url":"https://api.github.com/users/Wizcorp/following{/other_user}","gists_url":"https://api.github.com/users/Wizcorp/gists{/gist_id}","starred_url":"https://api.github.com/users/Wizcorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wizcorp/subscriptions","organizations_url":"https://api.github.com/users/Wizcorp/orgs","repos_url":"https://api.github.com/users/Wizcorp/repos","events_url":"https://api.github.com/users/Wizcorp/events{/privacy}","received_events_url":"https://api.github.com/users/Wizcorp/received_events","type":"Organization","site_admin":false},"repo":{"id":17165350,"name":"node-iap","full_name":"Wizcorp/node-iap","owner":{"login":"Wizcorp","id":592346,"avatar_url":"https://avatars2.githubusercontent.com/u/592346?v=4","gravatar_id":"","url":"https://api.github.com/users/Wizcorp","html_url":"https://github.com/Wizcorp","followers_url":"https://api.github.com/users/Wizcorp/followers","following_url":"https://api.github.com/users/Wizcorp/following{/other_user}","gists_url":"https://api.github.com/users/Wizcorp/gists{/gist_id}","starred_url":"https://api.github.com/users/Wizcorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wizcorp/subscriptions","organizations_url":"https://api.github.com/users/Wizcorp/orgs","repos_url":"https://api.github.com/users/Wizcorp/repos","events_url":"https://api.github.com/users/Wizcorp/events{/privacy}","received_events_url":"https://api.github.com/users/Wizcorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wizcorp/node-iap","description":"In-app purchase validation for Apple, Google, Amazon, Roku","fork":false,"url":"https://api.github.com/repos/Wizcorp/node-iap","forks_url":"https://api.github.com/repos/Wizcorp/node-iap/forks","keys_url":"https://api.github.com/repos/Wizcorp/node-iap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wizcorp/node-iap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wizcorp/node-iap/teams","hooks_url":"https://api.github.com/repos/Wizcorp/node-iap/hooks","issue_events_url":"https://api.github.com/repos/Wizcorp/node-iap/issues/events{/number}","events_url":"https://api.github.com/repos/Wizcorp/node-iap/events","assignees_url":"https://api.github.com/repos/Wizcorp/node-iap/assignees{/user}","branches_url":"https://api.github.com/repos/Wizcorp/node-iap/branches{/branch}","tags_url":"https://api.github.com/repos/Wizcorp/node-iap/tags","blobs_url":"https://api.github.com/repos/Wizcorp/node-iap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wizcorp/node-iap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wizcorp/node-iap/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wizcorp/node-iap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wizcorp/node-iap/statuses/{sha}","languages_url":"https://api.github.com/repos/Wizcorp/node-iap/languages","stargazers_url":"https://api.github.com/repos/Wizcorp/node-iap/stargazers","contributors_url":"https://api.github.com/repos/Wizcorp/node-iap/contributors","subscribers_url":"https://api.github.com/repos/Wizcorp/node-iap/subscribers","subscription_url":"https://api.github.com/repos/Wizcorp/node-iap/subscription","commits_url":"https://api.github.com/repos/Wizcorp/node-iap/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wizcorp/node-iap/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wizcorp/node-iap/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wizcorp/node-iap/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wizcorp/node-iap/contents/{+path}","compare_url":"https://api.github.com/repos/Wizcorp/node-iap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wizcorp/node-iap/merges","archive_url":"https://api.github.com/repos/Wizcorp/node-iap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wizcorp/node-iap/downloads","issues_url":"https://api.github.com/repos/Wizcorp/node-iap/issues{/number}","pulls_url":"https://api.github.com/repos/Wizcorp/node-iap/pulls{/number}","milestones_url":"https://api.github.com/repos/Wizcorp/node-iap/milestones{/number}","notifications_url":"https://api.github.com/repos/Wizcorp/node-iap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wizcorp/node-iap/labels{/name}","releases_url":"https://api.github.com/repos/Wizcorp/node-iap/releases{/id}","deployments_url":"https://api.github.com/repos/Wizcorp/node-iap/deployments","created_at":"2014-02-25T07:47:08Z","updated_at":"2018-05-10T01:29:49Z","pushed_at":"2018-05-10T01:29:47Z","git_url":"git://github.com/Wizcorp/node-iap.git","ssh_url":"git@github.com:Wizcorp/node-iap.git","clone_url":"https://github.com/Wizcorp/node-iap.git","svn_url":"https://github.com/Wizcorp/node-iap","homepage":"","size":106,"stargazers_count":104,"watchers_count":104,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":47,"open_issues":6,"watchers":104,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40"},"html":{"href":"https://github.com/Wizcorp/node-iap/pull/40"},"issue":{"href":"https://api.github.com/repos/Wizcorp/node-iap/issues/40"},"comments":{"href":"https://api.github.com/repos/Wizcorp/node-iap/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/Wizcorp/node-iap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wizcorp/node-iap/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/Wizcorp/node-iap/statuses/89ca156bc53fb2a68b09d1cde269c02eaf9caac4"}},"author_association":"NONE"}}
{"actor":{"display_login":"superandrew213"}}