{"action":"created","comment":{"url":"https://api.github.com/repos/killbill/killbill/pulls/comments/86645542","pull_request_review_id":7296964,"id":86645542,"diff_hunk":"@@ -398,6 +398,8 @@ public boolean apply(final PaymentTransactionModelDao input) {\n                     // We can't tell where we should be in the state machine - bail (cannot be enforced by the state machine unfortunately because UNKNOWN and PLUGIN_FAILURE are both treated as EXCEPTION)\n                     if (transactionToComplete.getTransactionStatus() == TransactionStatus.UNKNOWN) {\n                         throw new PaymentApiException(ErrorCode.PAYMENT_INVALID_OPERATION, paymentStateContext.getTransactionType(), transactionToComplete.getTransactionStatus());\n+                    } else if (transactionToComplete.getTransactionStatus() == TransactionStatus.SUCCESS ){\n+                        throw new PaymentApiException(ErrorCode.PAYMENT_ACTIVE_TRANSACTION_KEY_EXISTS, paymentStateContext.getPaymentTransactionExternalKey());","path":"payment/src/main/java/org/killbill/billing/payment/core/PaymentProcessor.java","position":5,"original_position":5,"commit_id":"a7527cbfab4e21ad4878a291fbbf68a5c75b1d3f","original_commit_id":"a7527cbfab4e21ad4878a291fbbf68a5c75b1d3f","user":{"login":"pierre","id":51940,"avatar_url":"https://avatars.githubusercontent.com/u/51940?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre","html_url":"https://github.com/pierre","followers_url":"https://api.github.com/users/pierre/followers","following_url":"https://api.github.com/users/pierre/following{/other_user}","gists_url":"https://api.github.com/users/pierre/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre/subscriptions","organizations_url":"https://api.github.com/users/pierre/orgs","repos_url":"https://api.github.com/users/pierre/repos","events_url":"https://api.github.com/users/pierre/events{/privacy}","received_events_url":"https://api.github.com/users/pierre/received_events","type":"User","site_admin":false},"body":"Why isn't it caught by line 452 below (`// Sanity: verify we don't already have a successful transaction for that key...`)?","created_at":"2016-11-04T22:48:14Z","updated_at":"2016-11-04T22:48:14Z","html_url":"https://github.com/killbill/killbill/pull/643#discussion_r86645542","pull_request_url":"https://api.github.com/repos/killbill/killbill/pulls/643","_links":{"self":{"href":"https://api.github.com/repos/killbill/killbill/pulls/comments/86645542"},"html":{"href":"https://github.com/killbill/killbill/pull/643#discussion_r86645542"},"pull_request":{"href":"https://api.github.com/repos/killbill/killbill/pulls/643"}}},"pull_request":{"url":"https://api.github.com/repos/killbill/killbill/pulls/643","id":91837040,"html_url":"https://github.com/killbill/killbill/pull/643","diff_url":"https://github.com/killbill/killbill/pull/643.diff","patch_url":"https://github.com/killbill/killbill/pull/643.patch","issue_url":"https://api.github.com/repos/killbill/killbill/issues/643","number":643,"state":"open","locked":false,"title":"fix duplicated transactions issue when there is a previously unknown …","user":{"login":"unieagle","id":3896193,"avatar_url":"https://avatars.githubusercontent.com/u/3896193?v=3","gravatar_id":"","url":"https://api.github.com/users/unieagle","html_url":"https://github.com/unieagle","followers_url":"https://api.github.com/users/unieagle/followers","following_url":"https://api.github.com/users/unieagle/following{/other_user}","gists_url":"https://api.github.com/users/unieagle/gists{/gist_id}","starred_url":"https://api.github.com/users/unieagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unieagle/subscriptions","organizations_url":"https://api.github.com/users/unieagle/orgs","repos_url":"https://api.github.com/users/unieagle/repos","events_url":"https://api.github.com/users/unieagle/events{/privacy}","received_events_url":"https://api.github.com/users/unieagle/received_events","type":"User","site_admin":false},"body":"…transaction using same transaction external key\r\n\r\nFixing Issue: https://github.com/killbill/killbill/issues/639\r\n\r\n@sbrossie @daliwei please review, thanks!","created_at":"2016-11-01T18:26:08Z","updated_at":"2016-11-04T22:48:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6d9d5997ce2be108826270235e8151e6e25396f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/killbill/killbill/pulls/643/commits","review_comments_url":"https://api.github.com/repos/killbill/killbill/pulls/643/comments","review_comment_url":"https://api.github.com/repos/killbill/killbill/pulls/comments{/number}","comments_url":"https://api.github.com/repos/killbill/killbill/issues/643/comments","statuses_url":"https://api.github.com/repos/killbill/killbill/statuses/a7527cbfab4e21ad4878a291fbbf68a5c75b1d3f","head":{"label":"unieagle:xqiu_20161013_fix_duplicate_transaction","ref":"xqiu_20161013_fix_duplicate_transaction","sha":"a7527cbfab4e21ad4878a291fbbf68a5c75b1d3f","user":{"login":"unieagle","id":3896193,"avatar_url":"https://avatars.githubusercontent.com/u/3896193?v=3","gravatar_id":"","url":"https://api.github.com/users/unieagle","html_url":"https://github.com/unieagle","followers_url":"https://api.github.com/users/unieagle/followers","following_url":"https://api.github.com/users/unieagle/following{/other_user}","gists_url":"https://api.github.com/users/unieagle/gists{/gist_id}","starred_url":"https://api.github.com/users/unieagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unieagle/subscriptions","organizations_url":"https://api.github.com/users/unieagle/orgs","repos_url":"https://api.github.com/users/unieagle/repos","events_url":"https://api.github.com/users/unieagle/events{/privacy}","received_events_url":"https://api.github.com/users/unieagle/received_events","type":"User","site_admin":false},"repo":{"id":72564106,"name":"killbill","full_name":"unieagle/killbill","owner":{"login":"unieagle","id":3896193,"avatar_url":"https://avatars.githubusercontent.com/u/3896193?v=3","gravatar_id":"","url":"https://api.github.com/users/unieagle","html_url":"https://github.com/unieagle","followers_url":"https://api.github.com/users/unieagle/followers","following_url":"https://api.github.com/users/unieagle/following{/other_user}","gists_url":"https://api.github.com/users/unieagle/gists{/gist_id}","starred_url":"https://api.github.com/users/unieagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unieagle/subscriptions","organizations_url":"https://api.github.com/users/unieagle/orgs","repos_url":"https://api.github.com/users/unieagle/repos","events_url":"https://api.github.com/users/unieagle/events{/privacy}","received_events_url":"https://api.github.com/users/unieagle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/unieagle/killbill","description":"Open-Source Subscription Billing & Payment Platform","fork":true,"url":"https://api.github.com/repos/unieagle/killbill","forks_url":"https://api.github.com/repos/unieagle/killbill/forks","keys_url":"https://api.github.com/repos/unieagle/killbill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unieagle/killbill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unieagle/killbill/teams","hooks_url":"https://api.github.com/repos/unieagle/killbill/hooks","issue_events_url":"https://api.github.com/repos/unieagle/killbill/issues/events{/number}","events_url":"https://api.github.com/repos/unieagle/killbill/events","assignees_url":"https://api.github.com/repos/unieagle/killbill/assignees{/user}","branches_url":"https://api.github.com/repos/unieagle/killbill/branches{/branch}","tags_url":"https://api.github.com/repos/unieagle/killbill/tags","blobs_url":"https://api.github.com/repos/unieagle/killbill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unieagle/killbill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unieagle/killbill/git/refs{/sha}","trees_url":"https://api.github.com/repos/unieagle/killbill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unieagle/killbill/statuses/{sha}","languages_url":"https://api.github.com/repos/unieagle/killbill/languages","stargazers_url":"https://api.github.com/repos/unieagle/killbill/stargazers","contributors_url":"https://api.github.com/repos/unieagle/killbill/contributors","subscribers_url":"https://api.github.com/repos/unieagle/killbill/subscribers","subscription_url":"https://api.github.com/repos/unieagle/killbill/subscription","commits_url":"https://api.github.com/repos/unieagle/killbill/commits{/sha}","git_commits_url":"https://api.github.com/repos/unieagle/killbill/git/commits{/sha}","comments_url":"https://api.github.com/repos/unieagle/killbill/comments{/number}","issue_comment_url":"https://api.github.com/repos/unieagle/killbill/issues/comments{/number}","contents_url":"https://api.github.com/repos/unieagle/killbill/contents/{+path}","compare_url":"https://api.github.com/repos/unieagle/killbill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unieagle/killbill/merges","archive_url":"https://api.github.com/repos/unieagle/killbill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unieagle/killbill/downloads","issues_url":"https://api.github.com/repos/unieagle/killbill/issues{/number}","pulls_url":"https://api.github.com/repos/unieagle/killbill/pulls{/number}","milestones_url":"https://api.github.com/repos/unieagle/killbill/milestones{/number}","notifications_url":"https://api.github.com/repos/unieagle/killbill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unieagle/killbill/labels{/name}","releases_url":"https://api.github.com/repos/unieagle/killbill/releases{/id}","deployments_url":"https://api.github.com/repos/unieagle/killbill/deployments","created_at":"2016-11-01T18:23:41Z","updated_at":"2016-11-01T18:23:47Z","pushed_at":"2016-11-04T21:20:22Z","git_url":"git://github.com/unieagle/killbill.git","ssh_url":"git@github.com:unieagle/killbill.git","clone_url":"https://github.com/unieagle/killbill.git","svn_url":"https://github.com/unieagle/killbill","homepage":"http://killbill.io/","size":661672,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"master"}},"base":{"label":"killbill:master","ref":"master","sha":"3cd2cb4979a13fd9bd708582de8899f97404adbe","user":{"login":"killbill","id":2446739,"avatar_url":"https://avatars.githubusercontent.com/u/2446739?v=3","gravatar_id":"","url":"https://api.github.com/users/killbill","html_url":"https://github.com/killbill","followers_url":"https://api.github.com/users/killbill/followers","following_url":"https://api.github.com/users/killbill/following{/other_user}","gists_url":"https://api.github.com/users/killbill/gists{/gist_id}","starred_url":"https://api.github.com/users/killbill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killbill/subscriptions","organizations_url":"https://api.github.com/users/killbill/orgs","repos_url":"https://api.github.com/users/killbill/repos","events_url":"https://api.github.com/users/killbill/events{/privacy}","received_events_url":"https://api.github.com/users/killbill/received_events","type":"Organization","site_admin":false},"repo":{"id":6325420,"name":"killbill","full_name":"killbill/killbill","owner":{"login":"killbill","id":2446739,"avatar_url":"https://avatars.githubusercontent.com/u/2446739?v=3","gravatar_id":"","url":"https://api.github.com/users/killbill","html_url":"https://github.com/killbill","followers_url":"https://api.github.com/users/killbill/followers","following_url":"https://api.github.com/users/killbill/following{/other_user}","gists_url":"https://api.github.com/users/killbill/gists{/gist_id}","starred_url":"https://api.github.com/users/killbill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/killbill/subscriptions","organizations_url":"https://api.github.com/users/killbill/orgs","repos_url":"https://api.github.com/users/killbill/repos","events_url":"https://api.github.com/users/killbill/events{/privacy}","received_events_url":"https://api.github.com/users/killbill/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/killbill/killbill","description":"Open-Source Subscription Billing & Payment Platform","fork":false,"url":"https://api.github.com/repos/killbill/killbill","forks_url":"https://api.github.com/repos/killbill/killbill/forks","keys_url":"https://api.github.com/repos/killbill/killbill/keys{/key_id}","collaborators_url":"https://api.github.com/repos/killbill/killbill/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/killbill/killbill/teams","hooks_url":"https://api.github.com/repos/killbill/killbill/hooks","issue_events_url":"https://api.github.com/repos/killbill/killbill/issues/events{/number}","events_url":"https://api.github.com/repos/killbill/killbill/events","assignees_url":"https://api.github.com/repos/killbill/killbill/assignees{/user}","branches_url":"https://api.github.com/repos/killbill/killbill/branches{/branch}","tags_url":"https://api.github.com/repos/killbill/killbill/tags","blobs_url":"https://api.github.com/repos/killbill/killbill/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/killbill/killbill/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/killbill/killbill/git/refs{/sha}","trees_url":"https://api.github.com/repos/killbill/killbill/git/trees{/sha}","statuses_url":"https://api.github.com/repos/killbill/killbill/statuses/{sha}","languages_url":"https://api.github.com/repos/killbill/killbill/languages","stargazers_url":"https://api.github.com/repos/killbill/killbill/stargazers","contributors_url":"https://api.github.com/repos/killbill/killbill/contributors","subscribers_url":"https://api.github.com/repos/killbill/killbill/subscribers","subscription_url":"https://api.github.com/repos/killbill/killbill/subscription","commits_url":"https://api.github.com/repos/killbill/killbill/commits{/sha}","git_commits_url":"https://api.github.com/repos/killbill/killbill/git/commits{/sha}","comments_url":"https://api.github.com/repos/killbill/killbill/comments{/number}","issue_comment_url":"https://api.github.com/repos/killbill/killbill/issues/comments{/number}","contents_url":"https://api.github.com/repos/killbill/killbill/contents/{+path}","compare_url":"https://api.github.com/repos/killbill/killbill/compare/{base}...{head}","merges_url":"https://api.github.com/repos/killbill/killbill/merges","archive_url":"https://api.github.com/repos/killbill/killbill/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/killbill/killbill/downloads","issues_url":"https://api.github.com/repos/killbill/killbill/issues{/number}","pulls_url":"https://api.github.com/repos/killbill/killbill/pulls{/number}","milestones_url":"https://api.github.com/repos/killbill/killbill/milestones{/number}","notifications_url":"https://api.github.com/repos/killbill/killbill/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/killbill/killbill/labels{/name}","releases_url":"https://api.github.com/repos/killbill/killbill/releases{/id}","deployments_url":"https://api.github.com/repos/killbill/killbill/deployments","created_at":"2012-10-21T20:55:05Z","updated_at":"2016-11-03T11:37:20Z","pushed_at":"2016-11-04T21:20:23Z","git_url":"git://github.com/killbill/killbill.git","ssh_url":"git@github.com:killbill/killbill.git","clone_url":"https://github.com/killbill/killbill.git","svn_url":"https://github.com/killbill/killbill","homepage":"http://killbill.io/","size":665317,"stargazers_count":1230,"watchers_count":1230,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":199,"mirror_url":null,"open_issues_count":72,"forks":199,"open_issues":72,"watchers":1230,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/killbill/killbill/pulls/643"},"html":{"href":"https://github.com/killbill/killbill/pull/643"},"issue":{"href":"https://api.github.com/repos/killbill/killbill/issues/643"},"comments":{"href":"https://api.github.com/repos/killbill/killbill/issues/643/comments"},"review_comments":{"href":"https://api.github.com/repos/killbill/killbill/pulls/643/comments"},"review_comment":{"href":"https://api.github.com/repos/killbill/killbill/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/killbill/killbill/pulls/643/commits"},"statuses":{"href":"https://api.github.com/repos/killbill/killbill/statuses/a7527cbfab4e21ad4878a291fbbf68a5c75b1d3f"}}}}
{"actor":{"display_login":"pierre"}}