{"action":"created","comment":{"url":"https://api.github.com/repos/HabitRPG/habitica/pulls/comments/84772176","pull_request_review_id":5527754,"id":84772176,"diff_hunk":"@@ -124,9 +131,25 @@ api.subscribeEdit = {\n   middlewares: [authWithHeaders()],\n   async handler (req, res) {\n     let token = req.body.id;\n+    let groupId = req.body.groupId;\n     let user = res.locals.user;\n     let customerId = user.purchased.plan.customerId;","path":"website/server/controllers/top-level/payments/stripe.js","position":39,"original_position":39,"commit_id":"afb69c384c9364e99c4e57a68a0e9ba7b998c68f","original_commit_id":"afb69c384c9364e99c4e57a68a0e9ba7b998c68f","user":{"login":"paglias","id":589911,"avatar_url":"https://avatars.githubusercontent.com/u/589911?v=3","gravatar_id":"","url":"https://api.github.com/users/paglias","html_url":"https://github.com/paglias","followers_url":"https://api.github.com/users/paglias/followers","following_url":"https://api.github.com/users/paglias/following{/other_user}","gists_url":"https://api.github.com/users/paglias/gists{/gist_id}","starred_url":"https://api.github.com/users/paglias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paglias/subscriptions","organizations_url":"https://api.github.com/users/paglias/orgs","repos_url":"https://api.github.com/users/paglias/repos","events_url":"https://api.github.com/users/paglias/events{/privacy}","received_events_url":"https://api.github.com/users/paglias/received_events","type":"User","site_admin":false},"body":"else if in case we're not dealing with a group","created_at":"2016-10-24T20:08:52Z","updated_at":"2016-10-24T20:12:45Z","html_url":"https://github.com/HabitRPG/habitica/pull/8153#discussion_r84772176","pull_request_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153","_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/comments/84772176"},"html":{"href":"https://github.com/HabitRPG/habitica/pull/8153#discussion_r84772176"},"pull_request":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153"}}},"pull_request":{"url":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153","id":89991206,"html_url":"https://github.com/HabitRPG/habitica/pull/8153","diff_url":"https://github.com/HabitRPG/habitica/pull/8153.diff","patch_url":"https://github.com/HabitRPG/habitica/pull/8153.patch","issue_url":"https://api.github.com/repos/HabitRPG/habitica/issues/8153","number":8153,"state":"open","locked":false,"title":"Group plan subscription","user":{"login":"TheHollidayInn","id":1253400,"avatar_url":"https://avatars.githubusercontent.com/u/1253400?v=3","gravatar_id":"","url":"https://api.github.com/users/TheHollidayInn","html_url":"https://github.com/TheHollidayInn","followers_url":"https://api.github.com/users/TheHollidayInn/followers","following_url":"https://api.github.com/users/TheHollidayInn/following{/other_user}","gists_url":"https://api.github.com/users/TheHollidayInn/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHollidayInn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHollidayInn/subscriptions","organizations_url":"https://api.github.com/users/TheHollidayInn/orgs","repos_url":"https://api.github.com/users/TheHollidayInn/repos","events_url":"https://api.github.com/users/TheHollidayInn/events{/privacy}","received_events_url":"https://api.github.com/users/TheHollidayInn/received_events","type":"User","site_admin":false},"body":"[//]: # (Note: See http://habitica.wikia.com/wiki/Using_Habitica_Git#Pull_Request for more info)\r\n\r\n[//]: # (Put Issue # or URL here, if applicable. This will automatically close the issue if your PR is merged in)\r\nFixes put_issue_url_here\r\n\r\n### Changes\r\n[//]: # (Describe the changes that were made in detail here. Include pictures if necessary)\r\n\r\n- [x] I will be abstracting the subscription details from Group and User before this is merged. I forgot to before the PR\r\n\r\nThis adds Group Subscriptions. More specifically:\r\n\r\n1. There is now a subscription tab on the group page\r\n2. Users can create a group sub with Stripe, Update their card, and Cancel\r\n3. Users can create a group sub with Paypal and cancel\r\n4. Users can create a group sub with Amazon and cancel\r\n\r\n\r\nA few things will need to be set up for this to work:\r\n\r\n1. Stripe needs a group_monthly plan added via the console\r\n2. Paypal needs a group monthly plan added via the rest API and the P-[id] will need to be added to the config.json\r\n3. I believe amazon should work by itself\r\n\r\n[//]: # (Put User ID in here - found in Settings -> API)\r\n----\r\nUUID: \r\n","created_at":"2016-10-19T11:35:18Z","updated_at":"2016-10-24T20:12:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f405b05319a64f21b079df1ebc587513f817fc1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153/commits","review_comments_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153/comments","review_comment_url":"https://api.github.com/repos/HabitRPG/habitica/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HabitRPG/habitica/issues/8153/comments","statuses_url":"https://api.github.com/repos/HabitRPG/habitica/statuses/afb69c384c9364e99c4e57a68a0e9ba7b998c68f","head":{"label":"TheHollidayInn:group-plan-subscription","ref":"group-plan-subscription","sha":"afb69c384c9364e99c4e57a68a0e9ba7b998c68f","user":{"login":"TheHollidayInn","id":1253400,"avatar_url":"https://avatars.githubusercontent.com/u/1253400?v=3","gravatar_id":"","url":"https://api.github.com/users/TheHollidayInn","html_url":"https://github.com/TheHollidayInn","followers_url":"https://api.github.com/users/TheHollidayInn/followers","following_url":"https://api.github.com/users/TheHollidayInn/following{/other_user}","gists_url":"https://api.github.com/users/TheHollidayInn/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHollidayInn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHollidayInn/subscriptions","organizations_url":"https://api.github.com/users/TheHollidayInn/orgs","repos_url":"https://api.github.com/users/TheHollidayInn/repos","events_url":"https://api.github.com/users/TheHollidayInn/events{/privacy}","received_events_url":"https://api.github.com/users/TheHollidayInn/received_events","type":"User","site_admin":false},"repo":{"id":31106714,"name":"habitrpg","full_name":"TheHollidayInn/habitrpg","owner":{"login":"TheHollidayInn","id":1253400,"avatar_url":"https://avatars.githubusercontent.com/u/1253400?v=3","gravatar_id":"","url":"https://api.github.com/users/TheHollidayInn","html_url":"https://github.com/TheHollidayInn","followers_url":"https://api.github.com/users/TheHollidayInn/followers","following_url":"https://api.github.com/users/TheHollidayInn/following{/other_user}","gists_url":"https://api.github.com/users/TheHollidayInn/gists{/gist_id}","starred_url":"https://api.github.com/users/TheHollidayInn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheHollidayInn/subscriptions","organizations_url":"https://api.github.com/users/TheHollidayInn/orgs","repos_url":"https://api.github.com/users/TheHollidayInn/repos","events_url":"https://api.github.com/users/TheHollidayInn/events{/privacy}","received_events_url":"https://api.github.com/users/TheHollidayInn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TheHollidayInn/habitrpg","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":true,"url":"https://api.github.com/repos/TheHollidayInn/habitrpg","forks_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/forks","keys_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/teams","hooks_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/hooks","issue_events_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/issues/events{/number}","events_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/events","assignees_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/assignees{/user}","branches_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/branches{/branch}","tags_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/tags","blobs_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/statuses/{sha}","languages_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/languages","stargazers_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/stargazers","contributors_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/contributors","subscribers_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/subscribers","subscription_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/subscription","commits_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/contents/{+path}","compare_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/merges","archive_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/downloads","issues_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/issues{/number}","pulls_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/pulls{/number}","milestones_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/milestones{/number}","notifications_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/labels{/name}","releases_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/releases{/id}","deployments_url":"https://api.github.com/repos/TheHollidayInn/habitrpg/deployments","created_at":"2015-02-21T02:07:13Z","updated_at":"2016-01-11T18:43:21Z","pushed_at":"2016-10-24T10:59:26Z","git_url":"git://github.com/TheHollidayInn/habitrpg.git","ssh_url":"git@github.com:TheHollidayInn/habitrpg.git","clone_url":"https://github.com/TheHollidayInn/habitrpg.git","svn_url":"https://github.com/TheHollidayInn/habitrpg","homepage":"habitrpg.com","size":475071,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"HabitRPG:develop","ref":"develop","sha":"f1bb2db73b5dc8ff54114662e9a86647f3bba320","user":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"repo":{"id":4578898,"name":"habitica","full_name":"HabitRPG/habitica","owner":{"login":"HabitRPG","id":3834775,"avatar_url":"https://avatars.githubusercontent.com/u/3834775?v=3","gravatar_id":"","url":"https://api.github.com/users/HabitRPG","html_url":"https://github.com/HabitRPG","followers_url":"https://api.github.com/users/HabitRPG/followers","following_url":"https://api.github.com/users/HabitRPG/following{/other_user}","gists_url":"https://api.github.com/users/HabitRPG/gists{/gist_id}","starred_url":"https://api.github.com/users/HabitRPG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HabitRPG/subscriptions","organizations_url":"https://api.github.com/users/HabitRPG/orgs","repos_url":"https://api.github.com/users/HabitRPG/repos","events_url":"https://api.github.com/users/HabitRPG/events{/privacy}","received_events_url":"https://api.github.com/users/HabitRPG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HabitRPG/habitica","description":"A habit tracker app which treats your goals like a Role Playing Game.","fork":false,"url":"https://api.github.com/repos/HabitRPG/habitica","forks_url":"https://api.github.com/repos/HabitRPG/habitica/forks","keys_url":"https://api.github.com/repos/HabitRPG/habitica/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HabitRPG/habitica/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HabitRPG/habitica/teams","hooks_url":"https://api.github.com/repos/HabitRPG/habitica/hooks","issue_events_url":"https://api.github.com/repos/HabitRPG/habitica/issues/events{/number}","events_url":"https://api.github.com/repos/HabitRPG/habitica/events","assignees_url":"https://api.github.com/repos/HabitRPG/habitica/assignees{/user}","branches_url":"https://api.github.com/repos/HabitRPG/habitica/branches{/branch}","tags_url":"https://api.github.com/repos/HabitRPG/habitica/tags","blobs_url":"https://api.github.com/repos/HabitRPG/habitica/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HabitRPG/habitica/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HabitRPG/habitica/git/refs{/sha}","trees_url":"https://api.github.com/repos/HabitRPG/habitica/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HabitRPG/habitica/statuses/{sha}","languages_url":"https://api.github.com/repos/HabitRPG/habitica/languages","stargazers_url":"https://api.github.com/repos/HabitRPG/habitica/stargazers","contributors_url":"https://api.github.com/repos/HabitRPG/habitica/contributors","subscribers_url":"https://api.github.com/repos/HabitRPG/habitica/subscribers","subscription_url":"https://api.github.com/repos/HabitRPG/habitica/subscription","commits_url":"https://api.github.com/repos/HabitRPG/habitica/commits{/sha}","git_commits_url":"https://api.github.com/repos/HabitRPG/habitica/git/commits{/sha}","comments_url":"https://api.github.com/repos/HabitRPG/habitica/comments{/number}","issue_comment_url":"https://api.github.com/repos/HabitRPG/habitica/issues/comments{/number}","contents_url":"https://api.github.com/repos/HabitRPG/habitica/contents/{+path}","compare_url":"https://api.github.com/repos/HabitRPG/habitica/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HabitRPG/habitica/merges","archive_url":"https://api.github.com/repos/HabitRPG/habitica/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HabitRPG/habitica/downloads","issues_url":"https://api.github.com/repos/HabitRPG/habitica/issues{/number}","pulls_url":"https://api.github.com/repos/HabitRPG/habitica/pulls{/number}","milestones_url":"https://api.github.com/repos/HabitRPG/habitica/milestones{/number}","notifications_url":"https://api.github.com/repos/HabitRPG/habitica/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HabitRPG/habitica/labels{/name}","releases_url":"https://api.github.com/repos/HabitRPG/habitica/releases{/id}","deployments_url":"https://api.github.com/repos/HabitRPG/habitica/deployments","created_at":"2012-06-06T22:49:48Z","updated_at":"2016-10-24T19:09:08Z","pushed_at":"2016-10-24T18:45:36Z","git_url":"git://github.com/HabitRPG/habitica.git","ssh_url":"git@github.com:HabitRPG/habitica.git","clone_url":"https://github.com/HabitRPG/habitica.git","svn_url":"https://github.com/HabitRPG/habitica","homepage":"https://habitica.com","size":540791,"stargazers_count":4276,"watchers_count":4276,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1817,"mirror_url":null,"open_issues_count":357,"forks":1817,"open_issues":357,"watchers":4276,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153"},"html":{"href":"https://github.com/HabitRPG/habitica/pull/8153"},"issue":{"href":"https://api.github.com/repos/HabitRPG/habitica/issues/8153"},"comments":{"href":"https://api.github.com/repos/HabitRPG/habitica/issues/8153/comments"},"review_comments":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153/comments"},"review_comment":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HabitRPG/habitica/pulls/8153/commits"},"statuses":{"href":"https://api.github.com/repos/HabitRPG/habitica/statuses/afb69c384c9364e99c4e57a68a0e9ba7b998c68f"}}}}
{"actor":{"display_login":"paglias"}}