{"action":"created","comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/27298276","id":27298276,"diff_hunk":"@@ -360,19 +363,19 @@ def build_title(params)\n       :listing_type => listing_type_label)\n   end\n \n-  def commission(community)\n+  def commission(community, process)\n     payment_type = MarketplaceService::Community::Query.payment_type(community.id)\n     payment_settings = TransactionService::API::Api.settings.get_active(community_id: community.id).maybe\n     currency = community.default_currency\n \n-    case payment_type\n-    when nil\n+    case [payment_type, process]\n+    when matches([__, :none])\n       {seller_commission_in_use: false,\n-       payment_gateway: payment_type,\n+       payment_gateway: nil,\n        minimum_commission: Money.new(0, currency),\n        commission_from_seller: 0,\n        minimum_price_cents: 0}\n-    when :paypal","path":"app/controllers/listings_controller.rb","position":71,"original_position":71,"commit_id":"1c97de9a07211dc4543ca1ba55c45471bfd6d49d","original_commit_id":"1c97de9a07211dc4543ca1ba55c45471bfd6d49d","user":{"login":"sktoiva","id":230815,"avatar_url":"https://avatars.githubusercontent.com/u/230815?v=3","gravatar_id":"","url":"https://api.github.com/users/sktoiva","html_url":"https://github.com/sktoiva","followers_url":"https://api.github.com/users/sktoiva/followers","following_url":"https://api.github.com/users/sktoiva/following{/other_user}","gists_url":"https://api.github.com/users/sktoiva/gists{/gist_id}","starred_url":"https://api.github.com/users/sktoiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sktoiva/subscriptions","organizations_url":"https://api.github.com/users/sktoiva/orgs","repos_url":"https://api.github.com/users/sktoiva/repos","events_url":"https://api.github.com/users/sktoiva/events{/privacy}","received_events_url":"https://api.github.com/users/sktoiva/received_events","type":"User","site_admin":false},"body":"shouldn't it be `[__, :paypal]?`","created_at":"2015-03-27T14:24:42Z","updated_at":"2015-03-27T14:24:42Z","html_url":"https://github.com/sharetribe/sharetribe/pull/1104#discussion_r27298276","pull_request_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104","_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments/27298276"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/1104#discussion_r27298276"},"pull_request":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104"}}},"pull_request":{"url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104","id":32110940,"html_url":"https://github.com/sharetribe/sharetribe/pull/1104","diff_url":"https://github.com/sharetribe/sharetribe/pull/1104.diff","patch_url":"https://github.com/sharetribe/sharetribe/pull/1104.patch","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1104","number":1104,"state":"open","locked":false,"title":"Look the process, not only payment settings","user":{"login":"rap1ds","id":429876,"avatar_url":"https://avatars.githubusercontent.com/u/429876?v=3","gravatar_id":"","url":"https://api.github.com/users/rap1ds","html_url":"https://github.com/rap1ds","followers_url":"https://api.github.com/users/rap1ds/followers","following_url":"https://api.github.com/users/rap1ds/following{/other_user}","gists_url":"https://api.github.com/users/rap1ds/gists{/gist_id}","starred_url":"https://api.github.com/users/rap1ds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rap1ds/subscriptions","organizations_url":"https://api.github.com/users/rap1ds/orgs","repos_url":"https://api.github.com/users/rap1ds/repos","events_url":"https://api.github.com/users/rap1ds/events{/privacy}","received_events_url":"https://api.github.com/users/rap1ds/received_events","type":"User","site_admin":false},"body":"- Commission counter under new listing price\r\n- Payment settings registeration guard before posting new listing\r\n- Warning about open listings but no payment info","created_at":"2015-03-27T14:19:34Z","updated_at":"2015-03-27T14:24:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f7ebf464141792b56424b9a67fab1128875a228","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104/commits","review_comments_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104/comments","review_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1104/comments","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/1c97de9a07211dc4543ca1ba55c45471bfd6d49d","head":{"label":"sharetribe:with-and-without-payments","ref":"with-and-without-payments","sha":"1c97de9a07211dc4543ca1ba55c45471bfd6d49d","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","created_at":"2012-05-25T15:34:17Z","updated_at":"2015-03-27T11:02:48Z","pushed_at":"2015-03-27T14:19:34Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":102136,"stargazers_count":246,"watchers_count":246,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":168,"mirror_url":null,"open_issues_count":17,"forks":168,"open_issues":17,"watchers":246,"default_branch":"master"}},"base":{"label":"sharetribe:master","ref":"master","sha":"15b8cd7b80cc1f343d06b7720a93aa428fcb3b38","user":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"repo":{"id":4447023,"name":"sharetribe","full_name":"sharetribe/sharetribe","owner":{"login":"sharetribe","id":1733898,"avatar_url":"https://avatars.githubusercontent.com/u/1733898?v=3","gravatar_id":"","url":"https://api.github.com/users/sharetribe","html_url":"https://github.com/sharetribe","followers_url":"https://api.github.com/users/sharetribe/followers","following_url":"https://api.github.com/users/sharetribe/following{/other_user}","gists_url":"https://api.github.com/users/sharetribe/gists{/gist_id}","starred_url":"https://api.github.com/users/sharetribe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharetribe/subscriptions","organizations_url":"https://api.github.com/users/sharetribe/orgs","repos_url":"https://api.github.com/users/sharetribe/repos","events_url":"https://api.github.com/users/sharetribe/events{/privacy}","received_events_url":"https://api.github.com/users/sharetribe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharetribe/sharetribe","description":"Open source marketplace platform","fork":false,"url":"https://api.github.com/repos/sharetribe/sharetribe","forks_url":"https://api.github.com/repos/sharetribe/sharetribe/forks","keys_url":"https://api.github.com/repos/sharetribe/sharetribe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharetribe/sharetribe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharetribe/sharetribe/teams","hooks_url":"https://api.github.com/repos/sharetribe/sharetribe/hooks","issue_events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/events{/number}","events_url":"https://api.github.com/repos/sharetribe/sharetribe/events","assignees_url":"https://api.github.com/repos/sharetribe/sharetribe/assignees{/user}","branches_url":"https://api.github.com/repos/sharetribe/sharetribe/branches{/branch}","tags_url":"https://api.github.com/repos/sharetribe/sharetribe/tags","blobs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharetribe/sharetribe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharetribe/sharetribe/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharetribe/sharetribe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharetribe/sharetribe/statuses/{sha}","languages_url":"https://api.github.com/repos/sharetribe/sharetribe/languages","stargazers_url":"https://api.github.com/repos/sharetribe/sharetribe/stargazers","contributors_url":"https://api.github.com/repos/sharetribe/sharetribe/contributors","subscribers_url":"https://api.github.com/repos/sharetribe/sharetribe/subscribers","subscription_url":"https://api.github.com/repos/sharetribe/sharetribe/subscription","commits_url":"https://api.github.com/repos/sharetribe/sharetribe/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharetribe/sharetribe/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharetribe/sharetribe/contents/{+path}","compare_url":"https://api.github.com/repos/sharetribe/sharetribe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharetribe/sharetribe/merges","archive_url":"https://api.github.com/repos/sharetribe/sharetribe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharetribe/sharetribe/downloads","issues_url":"https://api.github.com/repos/sharetribe/sharetribe/issues{/number}","pulls_url":"https://api.github.com/repos/sharetribe/sharetribe/pulls{/number}","milestones_url":"https://api.github.com/repos/sharetribe/sharetribe/milestones{/number}","notifications_url":"https://api.github.com/repos/sharetribe/sharetribe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/labels{/name}","releases_url":"https://api.github.com/repos/sharetribe/sharetribe/releases{/id}","created_at":"2012-05-25T15:34:17Z","updated_at":"2015-03-27T11:02:48Z","pushed_at":"2015-03-27T14:19:34Z","git_url":"git://github.com/sharetribe/sharetribe.git","ssh_url":"git@github.com:sharetribe/sharetribe.git","clone_url":"https://github.com/sharetribe/sharetribe.git","svn_url":"https://github.com/sharetribe/sharetribe","homepage":"https://www.sharetribe.com","size":102136,"stargazers_count":246,"watchers_count":246,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":168,"mirror_url":null,"open_issues_count":17,"forks":168,"open_issues":17,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104"},"html":{"href":"https://github.com/sharetribe/sharetribe/pull/1104"},"issue":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/1104"},"comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/issues/1104/comments"},"review_comments":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104/comments"},"review_comment":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharetribe/sharetribe/pulls/1104/commits"},"statuses":{"href":"https://api.github.com/repos/sharetribe/sharetribe/statuses/1c97de9a07211dc4543ca1ba55c45471bfd6d49d"}}}}