{"action":"created","comment":{"url":"https://api.github.com/repos/opencollective/opencollective-api/pulls/comments/208246179","pull_request_review_id":144014204,"id":208246179,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODI0NjE3OQ==","diff_hunk":"@@ -0,0 +1,438 @@\n+import sinon from 'sinon';\n+import { expect } from 'chai';\n+import * as utils from './utils';\n+import models from '../server/models';\n+import * as store from './features/support/stores';\n+\n+const ORDER_TOTAL_AMOUNT = 1000;\n+\n+const createOrderQuery = `\n+  mutation createOrder($order: OrderInputType!) {\n+    createOrder(order: $order) {\n+      id\n+      fromCollective {\n+        id\n+        slug\n+      }\n+      collective {\n+        id\n+        slug\n+      }\n+      subscription {\n+        id\n+        amount\n+        interval\n+        isActive\n+        stripeSubscriptionId\n+      }\n+      totalAmount\n+      currency\n+      description\n+    }\n+  }\n+`;\n+\n+\n+describe(\"payments.collectiveToCollective.test.js\", () => {","path":"test/paymentmethods.collective.to.collective.test.js","position":36,"original_position":36,"commit_id":"01e00aee46f4a6e7ca286a2d1265b0ebdf74fd29","original_commit_id":"01e00aee46f4a6e7ca286a2d1265b0ebdf74fd29","user":{"login":"marcogbarcellos","id":8717041,"node_id":"MDQ6VXNlcjg3MTcwNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/8717041?v=4","gravatar_id":"","url":"https://api.github.com/users/marcogbarcellos","html_url":"https://github.com/marcogbarcellos","followers_url":"https://api.github.com/users/marcogbarcellos/followers","following_url":"https://api.github.com/users/marcogbarcellos/following{/other_user}","gists_url":"https://api.github.com/users/marcogbarcellos/gists{/gist_id}","starred_url":"https://api.github.com/users/marcogbarcellos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcogbarcellos/subscriptions","organizations_url":"https://api.github.com/users/marcogbarcellos/orgs","repos_url":"https://api.github.com/users/marcogbarcellos/repos","events_url":"https://api.github.com/users/marcogbarcellos/events{/privacy}","received_events_url":"https://api.github.com/users/marcogbarcellos/received_events","type":"User","site_admin":false},"body":"yeah I was really confused because today there is no standard so i tried to follow at least the same standard as the other paymentMethods test files( example: `paymentmethods.paypal.payment.test.js`). anyways, i'll change here to camelCase at least in this case for now and will create an issue to standardize files test to camelCase. thanks.","created_at":"2018-08-07T14:10:55Z","updated_at":"2018-08-07T14:10:55Z","html_url":"https://github.com/opencollective/opencollective-api/pull/1404#discussion_r208246179","pull_request_url":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/opencollective/opencollective-api/pulls/comments/208246179"},"html":{"href":"https://github.com/opencollective/opencollective-api/pull/1404#discussion_r208246179"},"pull_request":{"href":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404"}},"in_reply_to_id":208150386},"pull_request":{"url":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404","id":206456773,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NDU2Nzcz","html_url":"https://github.com/opencollective/opencollective-api/pull/1404","diff_url":"https://github.com/opencollective/opencollective-api/pull/1404.diff","patch_url":"https://github.com/opencollective/opencollective-api/pull/1404.patch","issue_url":"https://api.github.com/repos/opencollective/opencollective-api/issues/1404","number":1404,"state":"open","locked":false,"title":"Add Collective to Collective donation across different hosts(one time and recurring payments) ","user":{"login":"marcogbarcellos","id":8717041,"node_id":"MDQ6VXNlcjg3MTcwNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/8717041?v=4","gravatar_id":"","url":"https://api.github.com/users/marcogbarcellos","html_url":"https://github.com/marcogbarcellos","followers_url":"https://api.github.com/users/marcogbarcellos/followers","following_url":"https://api.github.com/users/marcogbarcellos/following{/other_user}","gists_url":"https://api.github.com/users/marcogbarcellos/gists{/gist_id}","starred_url":"https://api.github.com/users/marcogbarcellos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcogbarcellos/subscriptions","organizations_url":"https://api.github.com/users/marcogbarcellos/orgs","repos_url":"https://api.github.com/users/marcogbarcellos/repos","events_url":"https://api.github.com/users/marcogbarcellos/events{/privacy}","received_events_url":"https://api.github.com/users/marcogbarcellos/received_events","type":"User","site_admin":false},"body":"Adding functionality so Collectives can pay other Collectives through different hosts. Also adding the feature `recurring` payments to the payment Method `opencollective`.\r\n\r\nThe way it's implemented is based on the issue [1196](https://github.com/opencollective/opencollective/issues/1196):\r\n\r\n1. Collective pays other collective through `opencollective` method(both one time and recurring)\r\n2. Method will look if both collectives have Stripe accounts setup, if so it will proceed with the payment through the credit card setup on the collective(that's paying) Stripe account.\r\n\r\nCloses opencollective/opencollective#1196","created_at":"2018-08-06T16:46:43Z","updated_at":"2018-08-07T14:10:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d8325ea5febe9f5a0a111807172e7f5684cdc43","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404/commits","review_comments_url":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404/comments","review_comment_url":"https://api.github.com/repos/opencollective/opencollective-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencollective/opencollective-api/issues/1404/comments","statuses_url":"https://api.github.com/repos/opencollective/opencollective-api/statuses/01e00aee46f4a6e7ca286a2d1265b0ebdf74fd29","head":{"label":"opencollective:collective-collective-multihost-support","ref":"collective-collective-multihost-support","sha":"01e00aee46f4a6e7ca286a2d1265b0ebdf74fd29","user":{"login":"opencollective","id":13403593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDAzNTkz","avatar_url":"https://avatars0.githubusercontent.com/u/13403593?v=4","gravatar_id":"","url":"https://api.github.com/users/opencollective","html_url":"https://github.com/opencollective","followers_url":"https://api.github.com/users/opencollective/followers","following_url":"https://api.github.com/users/opencollective/following{/other_user}","gists_url":"https://api.github.com/users/opencollective/gists{/gist_id}","starred_url":"https://api.github.com/users/opencollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencollective/subscriptions","organizations_url":"https://api.github.com/users/opencollective/orgs","repos_url":"https://api.github.com/users/opencollective/repos","events_url":"https://api.github.com/users/opencollective/events{/privacy}","received_events_url":"https://api.github.com/users/opencollective/received_events","type":"Organization","site_admin":false},"repo":{"id":35861629,"node_id":"MDEwOlJlcG9zaXRvcnkzNTg2MTYyOQ==","name":"opencollective-api","full_name":"opencollective/opencollective-api","owner":{"login":"opencollective","id":13403593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDAzNTkz","avatar_url":"https://avatars0.githubusercontent.com/u/13403593?v=4","gravatar_id":"","url":"https://api.github.com/users/opencollective","html_url":"https://github.com/opencollective","followers_url":"https://api.github.com/users/opencollective/followers","following_url":"https://api.github.com/users/opencollective/following{/other_user}","gists_url":"https://api.github.com/users/opencollective/gists{/gist_id}","starred_url":"https://api.github.com/users/opencollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencollective/subscriptions","organizations_url":"https://api.github.com/users/opencollective/orgs","repos_url":"https://api.github.com/users/opencollective/repos","events_url":"https://api.github.com/users/opencollective/events{/privacy}","received_events_url":"https://api.github.com/users/opencollective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencollective/opencollective-api","description":"OpenCollective's API","fork":false,"url":"https://api.github.com/repos/opencollective/opencollective-api","forks_url":"https://api.github.com/repos/opencollective/opencollective-api/forks","keys_url":"https://api.github.com/repos/opencollective/opencollective-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencollective/opencollective-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencollective/opencollective-api/teams","hooks_url":"https://api.github.com/repos/opencollective/opencollective-api/hooks","issue_events_url":"https://api.github.com/repos/opencollective/opencollective-api/issues/events{/number}","events_url":"https://api.github.com/repos/opencollective/opencollective-api/events","assignees_url":"https://api.github.com/repos/opencollective/opencollective-api/assignees{/user}","branches_url":"https://api.github.com/repos/opencollective/opencollective-api/branches{/branch}","tags_url":"https://api.github.com/repos/opencollective/opencollective-api/tags","blobs_url":"https://api.github.com/repos/opencollective/opencollective-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencollective/opencollective-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencollective/opencollective-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencollective/opencollective-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencollective/opencollective-api/statuses/{sha}","languages_url":"https://api.github.com/repos/opencollective/opencollective-api/languages","stargazers_url":"https://api.github.com/repos/opencollective/opencollective-api/stargazers","contributors_url":"https://api.github.com/repos/opencollective/opencollective-api/contributors","subscribers_url":"https://api.github.com/repos/opencollective/opencollective-api/subscribers","subscription_url":"https://api.github.com/repos/opencollective/opencollective-api/subscription","commits_url":"https://api.github.com/repos/opencollective/opencollective-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencollective/opencollective-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencollective/opencollective-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencollective/opencollective-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencollective/opencollective-api/contents/{+path}","compare_url":"https://api.github.com/repos/opencollective/opencollective-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencollective/opencollective-api/merges","archive_url":"https://api.github.com/repos/opencollective/opencollective-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencollective/opencollective-api/downloads","issues_url":"https://api.github.com/repos/opencollective/opencollective-api/issues{/number}","pulls_url":"https://api.github.com/repos/opencollective/opencollective-api/pulls{/number}","milestones_url":"https://api.github.com/repos/opencollective/opencollective-api/milestones{/number}","notifications_url":"https://api.github.com/repos/opencollective/opencollective-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencollective/opencollective-api/labels{/name}","releases_url":"https://api.github.com/repos/opencollective/opencollective-api/releases{/id}","deployments_url":"https://api.github.com/repos/opencollective/opencollective-api/deployments","created_at":"2015-05-19T05:40:22Z","updated_at":"2018-08-07T08:35:05Z","pushed_at":"2018-08-07T08:35:01Z","git_url":"git://github.com/opencollective/opencollective-api.git","ssh_url":"git@github.com:opencollective/opencollective-api.git","clone_url":"https://github.com/opencollective/opencollective-api.git","svn_url":"https://github.com/opencollective/opencollective-api","homepage":"","size":15278,"stargazers_count":88,"watchers_count":88,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":38,"open_issues":31,"watchers":88,"default_branch":"master"}},"base":{"label":"opencollective:master","ref":"master","sha":"461be583febe710d3c288a237c83ccc529a75206","user":{"login":"opencollective","id":13403593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDAzNTkz","avatar_url":"https://avatars0.githubusercontent.com/u/13403593?v=4","gravatar_id":"","url":"https://api.github.com/users/opencollective","html_url":"https://github.com/opencollective","followers_url":"https://api.github.com/users/opencollective/followers","following_url":"https://api.github.com/users/opencollective/following{/other_user}","gists_url":"https://api.github.com/users/opencollective/gists{/gist_id}","starred_url":"https://api.github.com/users/opencollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencollective/subscriptions","organizations_url":"https://api.github.com/users/opencollective/orgs","repos_url":"https://api.github.com/users/opencollective/repos","events_url":"https://api.github.com/users/opencollective/events{/privacy}","received_events_url":"https://api.github.com/users/opencollective/received_events","type":"Organization","site_admin":false},"repo":{"id":35861629,"node_id":"MDEwOlJlcG9zaXRvcnkzNTg2MTYyOQ==","name":"opencollective-api","full_name":"opencollective/opencollective-api","owner":{"login":"opencollective","id":13403593,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNDAzNTkz","avatar_url":"https://avatars0.githubusercontent.com/u/13403593?v=4","gravatar_id":"","url":"https://api.github.com/users/opencollective","html_url":"https://github.com/opencollective","followers_url":"https://api.github.com/users/opencollective/followers","following_url":"https://api.github.com/users/opencollective/following{/other_user}","gists_url":"https://api.github.com/users/opencollective/gists{/gist_id}","starred_url":"https://api.github.com/users/opencollective/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencollective/subscriptions","organizations_url":"https://api.github.com/users/opencollective/orgs","repos_url":"https://api.github.com/users/opencollective/repos","events_url":"https://api.github.com/users/opencollective/events{/privacy}","received_events_url":"https://api.github.com/users/opencollective/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencollective/opencollective-api","description":"OpenCollective's API","fork":false,"url":"https://api.github.com/repos/opencollective/opencollective-api","forks_url":"https://api.github.com/repos/opencollective/opencollective-api/forks","keys_url":"https://api.github.com/repos/opencollective/opencollective-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencollective/opencollective-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencollective/opencollective-api/teams","hooks_url":"https://api.github.com/repos/opencollective/opencollective-api/hooks","issue_events_url":"https://api.github.com/repos/opencollective/opencollective-api/issues/events{/number}","events_url":"https://api.github.com/repos/opencollective/opencollective-api/events","assignees_url":"https://api.github.com/repos/opencollective/opencollective-api/assignees{/user}","branches_url":"https://api.github.com/repos/opencollective/opencollective-api/branches{/branch}","tags_url":"https://api.github.com/repos/opencollective/opencollective-api/tags","blobs_url":"https://api.github.com/repos/opencollective/opencollective-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencollective/opencollective-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencollective/opencollective-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencollective/opencollective-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencollective/opencollective-api/statuses/{sha}","languages_url":"https://api.github.com/repos/opencollective/opencollective-api/languages","stargazers_url":"https://api.github.com/repos/opencollective/opencollective-api/stargazers","contributors_url":"https://api.github.com/repos/opencollective/opencollective-api/contributors","subscribers_url":"https://api.github.com/repos/opencollective/opencollective-api/subscribers","subscription_url":"https://api.github.com/repos/opencollective/opencollective-api/subscription","commits_url":"https://api.github.com/repos/opencollective/opencollective-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencollective/opencollective-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencollective/opencollective-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencollective/opencollective-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencollective/opencollective-api/contents/{+path}","compare_url":"https://api.github.com/repos/opencollective/opencollective-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencollective/opencollective-api/merges","archive_url":"https://api.github.com/repos/opencollective/opencollective-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencollective/opencollective-api/downloads","issues_url":"https://api.github.com/repos/opencollective/opencollective-api/issues{/number}","pulls_url":"https://api.github.com/repos/opencollective/opencollective-api/pulls{/number}","milestones_url":"https://api.github.com/repos/opencollective/opencollective-api/milestones{/number}","notifications_url":"https://api.github.com/repos/opencollective/opencollective-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencollective/opencollective-api/labels{/name}","releases_url":"https://api.github.com/repos/opencollective/opencollective-api/releases{/id}","deployments_url":"https://api.github.com/repos/opencollective/opencollective-api/deployments","created_at":"2015-05-19T05:40:22Z","updated_at":"2018-08-07T08:35:05Z","pushed_at":"2018-08-07T08:35:01Z","git_url":"git://github.com/opencollective/opencollective-api.git","ssh_url":"git@github.com:opencollective/opencollective-api.git","clone_url":"https://github.com/opencollective/opencollective-api.git","svn_url":"https://github.com/opencollective/opencollective-api","homepage":"","size":15278,"stargazers_count":88,"watchers_count":88,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":38,"open_issues":31,"watchers":88,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404"},"html":{"href":"https://github.com/opencollective/opencollective-api/pull/1404"},"issue":{"href":"https://api.github.com/repos/opencollective/opencollective-api/issues/1404"},"comments":{"href":"https://api.github.com/repos/opencollective/opencollective-api/issues/1404/comments"},"review_comments":{"href":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404/comments"},"review_comment":{"href":"https://api.github.com/repos/opencollective/opencollective-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencollective/opencollective-api/pulls/1404/commits"},"statuses":{"href":"https://api.github.com/repos/opencollective/opencollective-api/statuses/01e00aee46f4a6e7ca286a2d1265b0ebdf74fd29"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marcogbarcellos"}}