GitHub PullRequestReviewCommentEvent at 2014-07-17 13:10:22
Repository: PayumYiiExtension
Actor: makasim
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/comments/15055646","id":15055646,"diff_hunk":"@@ -2,31 +2,56 @@\n namespace Payum\\YiiExtension;\n \n use Payum\\Core\\Request\\BinaryMaskStatusRequest;\n+use Payum\\Core\\Request\\InteractiveRequestInterface;\n use Payum\\Core\\Request\\Http\\RedirectUrlInteractiveRequest;\n use Payum\\Core\\Request\\SecuredCaptureRequest;\n \n class PaymentController extends \\CController\n {\n+    public function init()\n+    {\n+        parent::init();\n+\n+        \\Yii::app()->attachEventHandler('onException', array($this, 'handleError'));\n+        \\Yii::app()->attachEventHandler('onException', array($this, 'handleException'));\n+    }\n+\n     public function actionCapture()\n     {\n         $token = $this->getPayum()->getHttpRequestVerifier()->verify($_REQUEST);\n         $payment = $this->getPayum()->getRegistry()->getPayment($token->getPaymentName());\n \n-        $payment->execute($status = new BinaryMaskStatusRequest($token));\n+        $status = new BinaryMaskStatusRequest($token);\n+        $payment->execute($status);\n \n-        if ($interactiveRequest = $payment->execute(new SecuredCaptureRequest($token), true)) {\n-            if ($interactiveRequest instanceof RedirectUrlInteractiveRequest) {\n-                $this->redirect($interactiveRequest->getUrl(), true);\n-            }\n-\n-            throw new \\LogicException('Unsupported interactive request', null, $interactiveRequest);\n-        }\n+        $capture = new SecuredCaptureRequest($token);\n+        $payment->execute($capture);\n \n         $this->getPayum()->getHttpRequestVerifier()->invalidate($token);\n \n         $this->redirect($token->getAfterUrl());\n     }\n \n+    public function handleError(\\CExceptionEvent $event)\n+    {\n+\n+    }\n+\n+    public function handleException(\\CExceptionEvent $event)","path":"src/Payum/YiiExtension/PaymentController.php","position":47,"original_position":47,"commit_id":"7e4be5fdad15011701969f76e48c271927ca740b","original_commit_id":"7e4be5fdad15011701969f76e48c271927ca740b","user":{"login":"makasim","id":143206,"avatar_url":"https://avatars.githubusercontent.com/u/143206?","gravatar_id":"13588b6015fc4f91316ea3ad1a18a0f5","url":"https://api.github.com/users/makasim","html_url":"https://github.com/makasim","followers_url":"https://api.github.com/users/makasim/followers","following_url":"https://api.github.com/users/makasim/following{/other_user}","gists_url":"https://api.github.com/users/makasim/gists{/gist_id}","starred_url":"https://api.github.com/users/makasim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/makasim/subscriptions","organizations_url":"https://api.github.com/users/makasim/orgs","repos_url":"https://api.github.com/users/makasim/repos","events_url":"https://api.github.com/users/makasim/events{/privacy}","received_events_url":"https://api.github.com/users/makasim/received_events","type":"User","site_admin":false},"body":"I think it would be good to move this method to the extension? WDYT?","created_at":"2014-07-17T13:10:22Z","updated_at":"2014-07-17T13:10:22Z","html_url":"https://github.com/Payum/PayumYiiExtension/pull/13#discussion_r15055646","pull_request_url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/comments/15055646"},"html":{"href":"https://github.com/Payum/PayumYiiExtension/pull/13#discussion_r15055646"},"pull_request":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13","id":18518568,"html_url":"https://github.com/Payum/PayumYiiExtension/pull/13","diff_url":"https://github.com/Payum/PayumYiiExtension/pull/13.diff","patch_url":"https://github.com/Payum/PayumYiiExtension/pull/13.patch","issue_url":"https://api.github.com/repos/Payum/PayumYiiExtension/issues/13","number":13,"state":"open","title":"Fix Payments handler not handling redirects","user":{"login":"alexandernst","id":89727,"avatar_url":"https://avatars.githubusercontent.com/u/89727?","gravatar_id":"a0e9a52555bc8c0ac3e5c9248506c01a","url":"https://api.github.com/users/alexandernst","html_url":"https://github.com/alexandernst","followers_url":"https://api.github.com/users/alexandernst/followers","following_url":"https://api.github.com/users/alexandernst/following{/other_user}","gists_url":"https://api.github.com/users/alexandernst/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandernst/subscriptions","organizations_url":"https://api.github.com/users/alexandernst/orgs","repos_url":"https://api.github.com/users/alexandernst/repos","events_url":"https://api.github.com/users/alexandernst/events{/privacy}","received_events_url":"https://api.github.com/users/alexandernst/received_events","type":"User","site_admin":false},"body":"I'm not sure if lines 19-21 are necessary or not. What do you think?","created_at":"2014-07-17T09:51:10Z","updated_at":"2014-07-17T13:10:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"614531a8a793187e5dc2f6e74756b2fb96093b9a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13/commits","review_comments_url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13/comments","review_comment_url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Payum/PayumYiiExtension/issues/13/comments","statuses_url":"https://api.github.com/repos/Payum/PayumYiiExtension/statuses/7e4be5fdad15011701969f76e48c271927ca740b","head":{"label":"alexandernst:master","ref":"master","sha":"7e4be5fdad15011701969f76e48c271927ca740b","user":{"login":"alexandernst","id":89727,"avatar_url":"https://avatars.githubusercontent.com/u/89727?","gravatar_id":"a0e9a52555bc8c0ac3e5c9248506c01a","url":"https://api.github.com/users/alexandernst","html_url":"https://github.com/alexandernst","followers_url":"https://api.github.com/users/alexandernst/followers","following_url":"https://api.github.com/users/alexandernst/following{/other_user}","gists_url":"https://api.github.com/users/alexandernst/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandernst/subscriptions","organizations_url":"https://api.github.com/users/alexandernst/orgs","repos_url":"https://api.github.com/users/alexandernst/repos","events_url":"https://api.github.com/users/alexandernst/events{/privacy}","received_events_url":"https://api.github.com/users/alexandernst/received_events","type":"User","site_admin":false},"repo":{"id":21816848,"name":"PayumYiiExtension","full_name":"alexandernst/PayumYiiExtension","owner":{"login":"alexandernst","id":89727,"avatar_url":"https://avatars.githubusercontent.com/u/89727?","gravatar_id":"a0e9a52555bc8c0ac3e5c9248506c01a","url":"https://api.github.com/users/alexandernst","html_url":"https://github.com/alexandernst","followers_url":"https://api.github.com/users/alexandernst/followers","following_url":"https://api.github.com/users/alexandernst/following{/other_user}","gists_url":"https://api.github.com/users/alexandernst/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandernst/subscriptions","organizations_url":"https://api.github.com/users/alexandernst/orgs","repos_url":"https://api.github.com/users/alexandernst/repos","events_url":"https://api.github.com/users/alexandernst/events{/privacy}","received_events_url":"https://api.github.com/users/alexandernst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexandernst/PayumYiiExtension","description":"Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more","fork":true,"url":"https://api.github.com/repos/alexandernst/PayumYiiExtension","forks_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/forks","keys_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/teams","hooks_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/hooks","issue_events_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/issues/events{/number}","events_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/events","assignees_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/assignees{/user}","branches_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/branches{/branch}","tags_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/tags","blobs_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/statuses/{sha}","languages_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/languages","stargazers_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/stargazers","contributors_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/contributors","subscribers_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/subscribers","subscription_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/subscription","commits_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/issues/comments/{number}","contents_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/contents/{+path}","compare_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/merges","archive_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/downloads","issues_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/issues{/number}","pulls_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/pulls{/number}","milestones_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/milestones{/number}","notifications_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/labels{/name}","releases_url":"https://api.github.com/repos/alexandernst/PayumYiiExtension/releases{/id}","created_at":"2014-07-14T11:07:42Z","updated_at":"2014-07-14T11:15:33Z","pushed_at":"2014-07-17T13:03:45Z","git_url":"git://github.com/alexandernst/PayumYiiExtension.git","ssh_url":"git@github.com:alexandernst/PayumYiiExtension.git","clone_url":"https://github.com/alexandernst/PayumYiiExtension.git","svn_url":"https://github.com/alexandernst/PayumYiiExtension","homepage":"  http://payum.org/doc#PayumYiiExtension","size":207,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Payum:master","ref":"master","sha":"8cd8533c8a4dbbebb31802d41dea5403f3c9d42f","user":{"login":"Payum","id":2638697,"avatar_url":"https://avatars.githubusercontent.com/u/2638697?","gravatar_id":"603ec09b696ecdb279b2bbc45406f34e","url":"https://api.github.com/users/Payum","html_url":"https://github.com/Payum","followers_url":"https://api.github.com/users/Payum/followers","following_url":"https://api.github.com/users/Payum/following{/other_user}","gists_url":"https://api.github.com/users/Payum/gists{/gist_id}","starred_url":"https://api.github.com/users/Payum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Payum/subscriptions","organizations_url":"https://api.github.com/users/Payum/orgs","repos_url":"https://api.github.com/users/Payum/repos","events_url":"https://api.github.com/users/Payum/events{/privacy}","received_events_url":"https://api.github.com/users/Payum/received_events","type":"Organization","site_admin":false},"repo":{"id":13293966,"name":"PayumYiiExtension","full_name":"Payum/PayumYiiExtension","owner":{"login":"Payum","id":2638697,"avatar_url":"https://avatars.githubusercontent.com/u/2638697?","gravatar_id":"603ec09b696ecdb279b2bbc45406f34e","url":"https://api.github.com/users/Payum","html_url":"https://github.com/Payum","followers_url":"https://api.github.com/users/Payum/followers","following_url":"https://api.github.com/users/Payum/following{/other_user}","gists_url":"https://api.github.com/users/Payum/gists{/gist_id}","starred_url":"https://api.github.com/users/Payum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Payum/subscriptions","organizations_url":"https://api.github.com/users/Payum/orgs","repos_url":"https://api.github.com/users/Payum/repos","events_url":"https://api.github.com/users/Payum/events{/privacy}","received_events_url":"https://api.github.com/users/Payum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Payum/PayumYiiExtension","description":"Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more","fork":false,"url":"https://api.github.com/repos/Payum/PayumYiiExtension","forks_url":"https://api.github.com/repos/Payum/PayumYiiExtension/forks","keys_url":"https://api.github.com/repos/Payum/PayumYiiExtension/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Payum/PayumYiiExtension/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Payum/PayumYiiExtension/teams","hooks_url":"https://api.github.com/repos/Payum/PayumYiiExtension/hooks","issue_events_url":"https://api.github.com/repos/Payum/PayumYiiExtension/issues/events{/number}","events_url":"https://api.github.com/repos/Payum/PayumYiiExtension/events","assignees_url":"https://api.github.com/repos/Payum/PayumYiiExtension/assignees{/user}","branches_url":"https://api.github.com/repos/Payum/PayumYiiExtension/branches{/branch}","tags_url":"https://api.github.com/repos/Payum/PayumYiiExtension/tags","blobs_url":"https://api.github.com/repos/Payum/PayumYiiExtension/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Payum/PayumYiiExtension/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Payum/PayumYiiExtension/git/refs{/sha}","trees_url":"https://api.github.com/repos/Payum/PayumYiiExtension/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Payum/PayumYiiExtension/statuses/{sha}","languages_url":"https://api.github.com/repos/Payum/PayumYiiExtension/languages","stargazers_url":"https://api.github.com/repos/Payum/PayumYiiExtension/stargazers","contributors_url":"https://api.github.com/repos/Payum/PayumYiiExtension/contributors","subscribers_url":"https://api.github.com/repos/Payum/PayumYiiExtension/subscribers","subscription_url":"https://api.github.com/repos/Payum/PayumYiiExtension/subscription","commits_url":"https://api.github.com/repos/Payum/PayumYiiExtension/commits{/sha}","git_commits_url":"https://api.github.com/repos/Payum/PayumYiiExtension/git/commits{/sha}","comments_url":"https://api.github.com/repos/Payum/PayumYiiExtension/comments{/number}","issue_comment_url":"https://api.github.com/repos/Payum/PayumYiiExtension/issues/comments/{number}","contents_url":"https://api.github.com/repos/Payum/PayumYiiExtension/contents/{+path}","compare_url":"https://api.github.com/repos/Payum/PayumYiiExtension/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Payum/PayumYiiExtension/merges","archive_url":"https://api.github.com/repos/Payum/PayumYiiExtension/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Payum/PayumYiiExtension/downloads","issues_url":"https://api.github.com/repos/Payum/PayumYiiExtension/issues{/number}","pulls_url":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls{/number}","milestones_url":"https://api.github.com/repos/Payum/PayumYiiExtension/milestones{/number}","notifications_url":"https://api.github.com/repos/Payum/PayumYiiExtension/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Payum/PayumYiiExtension/labels{/name}","releases_url":"https://api.github.com/repos/Payum/PayumYiiExtension/releases{/id}","created_at":"2013-10-03T08:40:48Z","updated_at":"2014-07-16T11:50:13Z","pushed_at":"2014-07-16T18:38:31Z","git_url":"git://github.com/Payum/PayumYiiExtension.git","ssh_url":"git@github.com:Payum/PayumYiiExtension.git","clone_url":"https://github.com/Payum/PayumYiiExtension.git","svn_url":"https://github.com/Payum/PayumYiiExtension","homepage":"  http://payum.org/doc#PayumYiiExtension","size":367,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":4,"mirror_url":null,"open_issues_count":4,"forks":4,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13"},"html":{"href":"https://github.com/Payum/PayumYiiExtension/pull/13"},"issue":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/issues/13"},"comments":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/Payum/PayumYiiExtension/statuses/7e4be5fdad15011701969f76e48c271927ca740b"}}}}