{"action":"created","comment":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/114068810","pull_request_review_id":35510955,"id":114068810,"diff_hunk":"@@ -1106,4 +1105,55 @@ public function testCardTypeAndPanTruncationLiveMode() {\n     $this->assertEquals(1111, $financialTrxn['pan_truncation']);\n   }\n \n+  /**\n+   * Test the submit function that completes the partially paid payment using Credit Card\n+   */\n+  public function testPartialPaymentWithCreditCard() {\n+    // create a partially paid contribution by using back-office form\n+    $form = new CRM_Contribute_Form_Contribution();\n+    $form->testSubmit(\n+      array(\n+        'total_amount' => 50,\n+        'financial_type_id' => 1,\n+        'receive_date' => '04/21/2015',\n+        'receive_date_time' => '11:27PM',\n+        'contact_id' => $this->_individualId,\n+        'payment_instrument_id' => array_search('Check', $this->paymentInstruments),\n+        'check_number' => substr(sha1(rand()), 0, 7),\n+        'billing_city-5' => 'Vancouver',\n+        'contribution_status_id' => CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Partially paid'),\n+      ), CRM_Core_Action::ADD\n+    );\n+\n+    $contribution = $this->callAPISuccessGetSingle('Contribution', array());\n+    $this->assertNotEmpty($contribution);\n+    $this->assertEquals('Partially paid', $contribution['contribution_status']);\n+    // pay additional amount by using Credit Card\n+    $form = new CRM_Contribute_Form_AdditionalPayment();\n+    $form->testSubmit(array(\n+      'contribution_id' => $contribution['id'],\n+      'contact_id' => $this->_individualId,\n+      'total_amount' => 50,\n+      'currency' => 'USD',\n+      'financial_type_id' => 1,\n+      'receive_date' => '04/21/2015',\n+      'receive_date_time' => '11:27PM',\n+      'contact_id' => $this->_individualId,\n+      'payment_instrument_id' => array_search('Credit card', $this->paymentInstruments),\n+      'payment_processor_id' => $this->paymentProcessorID,\n+      'credit_card_exp_date' => array('M' => 5, 'Y' => 2025),\n+      'credit_card_number' => '411111111111111',\n+      'cvv2' => 234,\n+      'credit_card_type' => 'Visa',\n+      'billing_city-5' => 'Vancouver',\n+      'billing_state_province_id-5' => 1059,\n+      'billing_postal_code-5' => 1321312,\n+      'billing_country_id-5' => 1228,\n+      'trxn_date' => '2017-04-11 13:05:11',\n+    ), 'live');\n+    $contribution = $this->callAPISuccessGetSingle('Contribution', array());\n+    $this->assertNotEmpty($contribution);\n+    $this->assertEquals('Completed', $contribution['contribution_status']);","path":"tests/phpunit/CRM/Contribute/Form/ContributionTest.php","position":60,"original_position":60,"commit_id":"f84a1a772060d954fdeb3c04863e43a5bc95ccd9","original_commit_id":"f84a1a772060d954fdeb3c04863e43a5bc95ccd9","user":{"login":"monishdeb","id":3735621,"avatar_url":"https://avatars0.githubusercontent.com/u/3735621?v=3","gravatar_id":"","url":"https://api.github.com/users/monishdeb","html_url":"https://github.com/monishdeb","followers_url":"https://api.github.com/users/monishdeb/followers","following_url":"https://api.github.com/users/monishdeb/following{/other_user}","gists_url":"https://api.github.com/users/monishdeb/gists{/gist_id}","starred_url":"https://api.github.com/users/monishdeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monishdeb/subscriptions","organizations_url":"https://api.github.com/users/monishdeb/orgs","repos_url":"https://api.github.com/users/monishdeb/repos","events_url":"https://api.github.com/users/monishdeb/events{/privacy}","received_events_url":"https://api.github.com/users/monishdeb/received_events","type":"User","site_admin":false},"body":"yup it passed earlier in my local \r\n```\r\nMonishs-MacBook-Pro:civicrm monish$ phpunit4 --filter=testPartialPaymentWithCreditCard tests/phpunit/CRM/Contribute/Form/ContributionTest.php\r\nPHPUnit 4.8.21 by Sebastian Bergmann and contributors.\r\n\r\n.\r\nInstalling civicrm47_drupal_test database\r\n\r\n\r\nTime: 6.17 seconds, Memory: 67.00Mb\r\n\r\nOK (1 test, 10 assertions)\r\n```\r\nbut unfortunately, it doesn't get passed in jenkin... don't knw why\r\n","created_at":"2017-04-30T07:13:37Z","updated_at":"2017-04-30T07:13:37Z","html_url":"https://github.com/civicrm/civicrm-core/pull/10285#discussion_r114068810","pull_request_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285","_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments/114068810"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/10285#discussion_r114068810"},"pull_request":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285"}}},"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285","id":118268828,"html_url":"https://github.com/civicrm/civicrm-core/pull/10285","diff_url":"https://github.com/civicrm/civicrm-core/pull/10285.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/10285.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/10285","number":10285,"state":"open","locked":false,"title":"CRM-20392: remove cruft code and added unit test","user":{"login":"monishdeb","id":3735621,"avatar_url":"https://avatars0.githubusercontent.com/u/3735621?v=3","gravatar_id":"","url":"https://api.github.com/users/monishdeb","html_url":"https://github.com/monishdeb","followers_url":"https://api.github.com/users/monishdeb/followers","following_url":"https://api.github.com/users/monishdeb/following{/other_user}","gists_url":"https://api.github.com/users/monishdeb/gists{/gist_id}","starred_url":"https://api.github.com/users/monishdeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monishdeb/subscriptions","organizations_url":"https://api.github.com/users/monishdeb/orgs","repos_url":"https://api.github.com/users/monishdeb/repos","events_url":"https://api.github.com/users/monishdeb/events{/privacy}","received_events_url":"https://api.github.com/users/monishdeb/received_events","type":"User","site_admin":false},"body":"* [CRM-20392: Credit card payment not recorded when contribution is partially paid](https://issues.civicrm.org/jira/browse/CRM-20392)","created_at":"2017-04-29T09:31:26Z","updated_at":"2017-04-30T07:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"895c9c15d75156629e550585028083773eec6710","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285/comments","review_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/10285/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/f84a1a772060d954fdeb3c04863e43a5bc95ccd9","head":{"label":"JMAConsulting:IIDA-108-2","ref":"IIDA-108-2","sha":"f84a1a772060d954fdeb3c04863e43a5bc95ccd9","user":{"login":"JMAConsulting","id":2036425,"avatar_url":"https://avatars3.githubusercontent.com/u/2036425?v=3","gravatar_id":"","url":"https://api.github.com/users/JMAConsulting","html_url":"https://github.com/JMAConsulting","followers_url":"https://api.github.com/users/JMAConsulting/followers","following_url":"https://api.github.com/users/JMAConsulting/following{/other_user}","gists_url":"https://api.github.com/users/JMAConsulting/gists{/gist_id}","starred_url":"https://api.github.com/users/JMAConsulting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JMAConsulting/subscriptions","organizations_url":"https://api.github.com/users/JMAConsulting/orgs","repos_url":"https://api.github.com/users/JMAConsulting/repos","events_url":"https://api.github.com/users/JMAConsulting/events{/privacy}","received_events_url":"https://api.github.com/users/JMAConsulting/received_events","type":"Organization","site_admin":false},"repo":{"id":16546304,"name":"civicrm-core","full_name":"JMAConsulting/civicrm-core","owner":{"login":"JMAConsulting","id":2036425,"avatar_url":"https://avatars3.githubusercontent.com/u/2036425?v=3","gravatar_id":"","url":"https://api.github.com/users/JMAConsulting","html_url":"https://github.com/JMAConsulting","followers_url":"https://api.github.com/users/JMAConsulting/followers","following_url":"https://api.github.com/users/JMAConsulting/following{/other_user}","gists_url":"https://api.github.com/users/JMAConsulting/gists{/gist_id}","starred_url":"https://api.github.com/users/JMAConsulting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JMAConsulting/subscriptions","organizations_url":"https://api.github.com/users/JMAConsulting/orgs","repos_url":"https://api.github.com/users/JMAConsulting/repos","events_url":"https://api.github.com/users/JMAConsulting/events{/privacy}","received_events_url":"https://api.github.com/users/JMAConsulting/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JMAConsulting/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":true,"url":"https://api.github.com/repos/JMAConsulting/civicrm-core","forks_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/forks","keys_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/teams","hooks_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/events","assignees_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/tags","blobs_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/subscription","commits_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/merges","archive_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/downloads","issues_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/JMAConsulting/civicrm-core/deployments","created_at":"2014-02-05T14:01:01Z","updated_at":"2015-03-25T16:46:36Z","pushed_at":"2017-04-29T15:37:49Z","git_url":"git://github.com/JMAConsulting/civicrm-core.git","ssh_url":"git@github.com:JMAConsulting/civicrm-core.git","clone_url":"https://github.com/JMAConsulting/civicrm-core.git","svn_url":"https://github.com/JMAConsulting/civicrm-core","homepage":null,"size":166061,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"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":"civicrm:master","ref":"master","sha":"c7d488a016067dc2c7c3d4becfcac392d642cff9","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars1.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":8495499,"name":"civicrm-core","full_name":"civicrm/civicrm-core","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars1.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":false,"url":"https://api.github.com/repos/civicrm/civicrm-core","forks_url":"https://api.github.com/repos/civicrm/civicrm-core/forks","keys_url":"https://api.github.com/repos/civicrm/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civicrm-core/teams","hooks_url":"https://api.github.com/repos/civicrm/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civicrm-core/events","assignees_url":"https://api.github.com/repos/civicrm/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civicrm-core/tags","blobs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/civicrm/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civicrm-core/subscription","commits_url":"https://api.github.com/repos/civicrm/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civicrm-core/merges","archive_url":"https://api.github.com/repos/civicrm/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civicrm-core/downloads","issues_url":"https://api.github.com/repos/civicrm/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civicrm-core/deployments","created_at":"2013-03-01T06:11:56Z","updated_at":"2017-04-21T04:48:58Z","pushed_at":"2017-04-30T01:23:54Z","git_url":"git://github.com/civicrm/civicrm-core.git","ssh_url":"git@github.com:civicrm/civicrm-core.git","clone_url":"https://github.com/civicrm/civicrm-core.git","svn_url":"https://github.com/civicrm/civicrm-core","homepage":null,"size":144896,"stargazers_count":190,"watchers_count":190,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":532,"mirror_url":null,"open_issues_count":158,"forks":532,"open_issues":158,"watchers":190,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/10285"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/10285"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/10285/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/10285/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-core/statuses/f84a1a772060d954fdeb3c04863e43a5bc95ccd9"}}}}
{"actor":{"display_login":"monishdeb"}}