{"action":"created","comment":{"url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/comments/64809990","id":64809990,"diff_hunk":"@@ -143,16 +141,45 @@ angular.module('confRegistrationWebApp')\n       }\n       $scope.paymentToRefund = payment;\n \n+      var refundAmount;\n+\n+      if($scope.isPartialRefundAvailable(payment, payment.paymentType)) {\n+        refundAmount = $scope.calculateRefundableAmount(payment);\n+        $scope.onlyFullRefund = false;\n+      }\n+      else {\n+        refundAmount = payment.amount;\n+        $scope.onlyFullRefund = true;\n+      }\n+\n       $scope.refund = {\n-        amount: $scope.calculateRefundableAmount(payment),\n+        amount: refundAmount,\n         refundedPaymentId: payment.id,\n         registrationId: payment.registrationId,\n         paymentType: 'REFUND',\n-        refundChannel: payment.paymentType,\n-        readyToProcess: true\n+        refundChannel: payment.paymentType\n       };\n     };\n \n+    $scope.refreshRefund = function (refund) {","path":"app/scripts/controllers/paymentModal.js","position":36,"original_position":36,"commit_id":"b463379a0a9778c0f4ae4b79c1ce1527ebf1dadc","original_commit_id":"b463379a0a9778c0f4ae4b79c1ce1527ebf1dadc","user":{"login":"adammeyer","id":4603906,"avatar_url":"https://avatars.githubusercontent.com/u/4603906?v=3","gravatar_id":"","url":"https://api.github.com/users/adammeyer","html_url":"https://github.com/adammeyer","followers_url":"https://api.github.com/users/adammeyer/followers","following_url":"https://api.github.com/users/adammeyer/following{/other_user}","gists_url":"https://api.github.com/users/adammeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/adammeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammeyer/subscriptions","organizations_url":"https://api.github.com/users/adammeyer/orgs","repos_url":"https://api.github.com/users/adammeyer/repos","events_url":"https://api.github.com/users/adammeyer/events{/privacy}","received_events_url":"https://api.github.com/users/adammeyer/received_events","type":"User","site_admin":false},"body":"Can you explain what this function is for?","created_at":"2016-05-26T19:55:44Z","updated_at":"2016-05-26T19:55:44Z","html_url":"https://github.com/CruGlobal/conf-registration-web/pull/460#discussion_r64809990","pull_request_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460","_links":{"self":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/comments/64809990"},"html":{"href":"https://github.com/CruGlobal/conf-registration-web/pull/460#discussion_r64809990"},"pull_request":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460"}}},"pull_request":{"url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460","id":71611281,"html_url":"https://github.com/CruGlobal/conf-registration-web/pull/460","diff_url":"https://github.com/CruGlobal/conf-registration-web/pull/460.diff","patch_url":"https://github.com/CruGlobal/conf-registration-web/pull/460.patch","issue_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/460","number":460,"state":"open","locked":false,"title":"Event 352","user":{"login":"dsgoers","id":8580520,"avatar_url":"https://avatars.githubusercontent.com/u/8580520?v=3","gravatar_id":"","url":"https://api.github.com/users/dsgoers","html_url":"https://github.com/dsgoers","followers_url":"https://api.github.com/users/dsgoers/followers","following_url":"https://api.github.com/users/dsgoers/following{/other_user}","gists_url":"https://api.github.com/users/dsgoers/gists{/gist_id}","starred_url":"https://api.github.com/users/dsgoers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsgoers/subscriptions","organizations_url":"https://api.github.com/users/dsgoers/orgs","repos_url":"https://api.github.com/users/dsgoers/repos","events_url":"https://api.github.com/users/dsgoers/events{/privacy}","received_events_url":"https://api.github.com/users/dsgoers/received_events","type":"User","site_admin":false},"body":"Removed readyToProcess and prevent users from attempting partial credit card refunds within 24 hours of the payment (this is also enforced by the API).","created_at":"2016-05-26T19:33:05Z","updated_at":"2016-05-26T19:55:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99b3a4f33df1bc7b4b621a2762b3e2595a51d347","assignee":{"login":"adammeyer","id":4603906,"avatar_url":"https://avatars.githubusercontent.com/u/4603906?v=3","gravatar_id":"","url":"https://api.github.com/users/adammeyer","html_url":"https://github.com/adammeyer","followers_url":"https://api.github.com/users/adammeyer/followers","following_url":"https://api.github.com/users/adammeyer/following{/other_user}","gists_url":"https://api.github.com/users/adammeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/adammeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adammeyer/subscriptions","organizations_url":"https://api.github.com/users/adammeyer/orgs","repos_url":"https://api.github.com/users/adammeyer/repos","events_url":"https://api.github.com/users/adammeyer/events{/privacy}","received_events_url":"https://api.github.com/users/adammeyer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460/commits","review_comments_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460/comments","review_comment_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/460/comments","statuses_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/statuses/b463379a0a9778c0f4ae4b79c1ce1527ebf1dadc","head":{"label":"CruGlobal:EVENT-352","ref":"EVENT-352","sha":"b463379a0a9778c0f4ae4b79c1ce1527ebf1dadc","user":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"repo":{"id":11006891,"name":"conf-registration-web","full_name":"CruGlobal/conf-registration-web","owner":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CruGlobal/conf-registration-web","description":"Event Registration Tool","fork":false,"url":"https://api.github.com/repos/CruGlobal/conf-registration-web","forks_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/forks","keys_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/teams","hooks_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/hooks","issue_events_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/events{/number}","events_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/events","assignees_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/assignees{/user}","branches_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/branches{/branch}","tags_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/tags","blobs_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/statuses/{sha}","languages_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/languages","stargazers_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/stargazers","contributors_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/contributors","subscribers_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/subscribers","subscription_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/subscription","commits_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/contents/{+path}","compare_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/merges","archive_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/downloads","issues_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues{/number}","pulls_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls{/number}","milestones_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/milestones{/number}","notifications_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/labels{/name}","releases_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/releases{/id}","deployments_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/deployments","created_at":"2013-06-27T20:21:39Z","updated_at":"2016-04-29T18:38:38Z","pushed_at":"2016-05-26T19:48:39Z","git_url":"git://github.com/CruGlobal/conf-registration-web.git","ssh_url":"git@github.com:CruGlobal/conf-registration-web.git","clone_url":"https://github.com/CruGlobal/conf-registration-web.git","svn_url":"https://github.com/CruGlobal/conf-registration-web","homepage":"https://www.eventregistrationtool.com","size":40190,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"CruGlobal:master","ref":"master","sha":"890540d2962a2e43096e7ef6b4b14215f1f09f58","user":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"repo":{"id":11006891,"name":"conf-registration-web","full_name":"CruGlobal/conf-registration-web","owner":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CruGlobal/conf-registration-web","description":"Event Registration Tool","fork":false,"url":"https://api.github.com/repos/CruGlobal/conf-registration-web","forks_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/forks","keys_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/teams","hooks_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/hooks","issue_events_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/events{/number}","events_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/events","assignees_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/assignees{/user}","branches_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/branches{/branch}","tags_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/tags","blobs_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/statuses/{sha}","languages_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/languages","stargazers_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/stargazers","contributors_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/contributors","subscribers_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/subscribers","subscription_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/subscription","commits_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/contents/{+path}","compare_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/merges","archive_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/downloads","issues_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues{/number}","pulls_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls{/number}","milestones_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/milestones{/number}","notifications_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/labels{/name}","releases_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/releases{/id}","deployments_url":"https://api.github.com/repos/CruGlobal/conf-registration-web/deployments","created_at":"2013-06-27T20:21:39Z","updated_at":"2016-04-29T18:38:38Z","pushed_at":"2016-05-26T19:48:39Z","git_url":"git://github.com/CruGlobal/conf-registration-web.git","ssh_url":"git@github.com:CruGlobal/conf-registration-web.git","clone_url":"https://github.com/CruGlobal/conf-registration-web.git","svn_url":"https://github.com/CruGlobal/conf-registration-web","homepage":"https://www.eventregistrationtool.com","size":40190,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460"},"html":{"href":"https://github.com/CruGlobal/conf-registration-web/pull/460"},"issue":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/460"},"comments":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/issues/460/comments"},"review_comments":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460/comments"},"review_comment":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/pulls/460/commits"},"statuses":{"href":"https://api.github.com/repos/CruGlobal/conf-registration-web/statuses/b463379a0a9778c0f4ae4b79c1ce1527ebf1dadc"}}}}
{"actor":{"display_login":"adammeyer"}}