{"action":"created","comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/comments/87582515","pull_request_review_id":8190724,"id":87582515,"diff_hunk":"@@ -320,47 +310,133 @@ protected function cullForGateway(&$fields, $defaults = array())\n      *\n      * @return array\n      */\n-    public function normalizeFormData(array $data) {\n+    public function normalizeFormData(array $data)\n+    {\n+        $renameMap = $this->getRenameMap();\n+\n+        $prefix = $this->getGatewayPrefix();\n+        // if a prefix has already been defined in the gateway namespace, continue using it\n+        // if not, and we have a global prefix, use that.\n+        // if not, $prefix becomes an empty string\n+        $prefix = ($prefix) ? $prefix : ($this->getGlobalPrefix() ?: '');\n+\n+        // strip prefix first\n+        foreach ($data as $key => $value) {\n+            if (strstr($key, $prefix)) {","path":"code/GatewayFieldsFactory.php","position":225,"original_position":226,"commit_id":"5311be60c08cb49fc950eb1e626de12f54195b49","original_commit_id":"66a5144fdf2f865e4e5e533309fb7cec45ae0ff3","user":{"login":"zanderwar","id":13566916,"avatar_url":"https://avatars.githubusercontent.com/u/13566916?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderwar","html_url":"https://github.com/zanderwar","followers_url":"https://api.github.com/users/zanderwar/followers","following_url":"https://api.github.com/users/zanderwar/following{/other_user}","gists_url":"https://api.github.com/users/zanderwar/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderwar/subscriptions","organizations_url":"https://api.github.com/users/zanderwar/orgs","repos_url":"https://api.github.com/users/zanderwar/repos","events_url":"https://api.github.com/users/zanderwar/events{/privacy}","received_events_url":"https://api.github.com/users/zanderwar/received_events","type":"User","site_admin":false},"body":"I agree, good spot","created_at":"2016-11-11T12:42:48Z","updated_at":"2016-11-11T12:42:48Z","html_url":"https://github.com/silverstripe/silverstripe-omnipay/pull/151#discussion_r87582515","pull_request_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151","_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/comments/87582515"},"html":{"href":"https://github.com/silverstripe/silverstripe-omnipay/pull/151#discussion_r87582515"},"pull_request":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151"}}},"pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151","id":93279974,"html_url":"https://github.com/silverstripe/silverstripe-omnipay/pull/151","diff_url":"https://github.com/silverstripe/silverstripe-omnipay/pull/151.diff","patch_url":"https://github.com/silverstripe/silverstripe-omnipay/pull/151.patch","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/151","number":151,"state":"open","locked":false,"title":"Improved/fixed custom field name support","user":{"login":"zanderwar","id":13566916,"avatar_url":"https://avatars.githubusercontent.com/u/13566916?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderwar","html_url":"https://github.com/zanderwar","followers_url":"https://api.github.com/users/zanderwar/followers","following_url":"https://api.github.com/users/zanderwar/following{/other_user}","gists_url":"https://api.github.com/users/zanderwar/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderwar/subscriptions","organizations_url":"https://api.github.com/users/zanderwar/orgs","repos_url":"https://api.github.com/users/zanderwar/repos","events_url":"https://api.github.com/users/zanderwar/events{/privacy}","received_events_url":"https://api.github.com/users/zanderwar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-11T05:05:05Z","updated_at":"2016-11-11T12:42:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e303638594a2881b77a68a90b2529c4aceb96d99","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151/commits","review_comments_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151/comments","review_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/151/comments","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/statuses/5311be60c08cb49fc950eb1e626de12f54195b49","head":{"label":"zanderwar:master","ref":"master","sha":"5311be60c08cb49fc950eb1e626de12f54195b49","user":{"login":"zanderwar","id":13566916,"avatar_url":"https://avatars.githubusercontent.com/u/13566916?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderwar","html_url":"https://github.com/zanderwar","followers_url":"https://api.github.com/users/zanderwar/followers","following_url":"https://api.github.com/users/zanderwar/following{/other_user}","gists_url":"https://api.github.com/users/zanderwar/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderwar/subscriptions","organizations_url":"https://api.github.com/users/zanderwar/orgs","repos_url":"https://api.github.com/users/zanderwar/repos","events_url":"https://api.github.com/users/zanderwar/events{/privacy}","received_events_url":"https://api.github.com/users/zanderwar/received_events","type":"User","site_admin":false},"repo":{"id":73426636,"name":"silverstripe-omnipay","full_name":"zanderwar/silverstripe-omnipay","owner":{"login":"zanderwar","id":13566916,"avatar_url":"https://avatars.githubusercontent.com/u/13566916?v=3","gravatar_id":"","url":"https://api.github.com/users/zanderwar","html_url":"https://github.com/zanderwar","followers_url":"https://api.github.com/users/zanderwar/followers","following_url":"https://api.github.com/users/zanderwar/following{/other_user}","gists_url":"https://api.github.com/users/zanderwar/gists{/gist_id}","starred_url":"https://api.github.com/users/zanderwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanderwar/subscriptions","organizations_url":"https://api.github.com/users/zanderwar/orgs","repos_url":"https://api.github.com/users/zanderwar/repos","events_url":"https://api.github.com/users/zanderwar/events{/privacy}","received_events_url":"https://api.github.com/users/zanderwar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zanderwar/silverstripe-omnipay","description":"SilverStripe integration with Omnipay PHP payments library.","fork":true,"url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay","forks_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/forks","keys_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/teams","hooks_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/hooks","issue_events_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/issues/events{/number}","events_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/events","assignees_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/assignees{/user}","branches_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/branches{/branch}","tags_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/tags","blobs_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/git/refs{/sha}","trees_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/statuses/{sha}","languages_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/languages","stargazers_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/stargazers","contributors_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/contributors","subscribers_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/subscribers","subscription_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/subscription","commits_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/commits{/sha}","git_commits_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/git/commits{/sha}","comments_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/comments{/number}","issue_comment_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/issues/comments{/number}","contents_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/contents/{+path}","compare_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/merges","archive_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/downloads","issues_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/issues{/number}","pulls_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/pulls{/number}","milestones_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/milestones{/number}","notifications_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/labels{/name}","releases_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/releases{/id}","deployments_url":"https://api.github.com/repos/zanderwar/silverstripe-omnipay/deployments","created_at":"2016-11-10T22:36:25Z","updated_at":"2016-11-10T22:36:26Z","pushed_at":"2016-11-11T09:17:40Z","git_url":"git://github.com/zanderwar/silverstripe-omnipay.git","ssh_url":"git@github.com:zanderwar/silverstripe-omnipay.git","clone_url":"https://github.com/zanderwar/silverstripe-omnipay.git","svn_url":"https://github.com/zanderwar/silverstripe-omnipay","homepage":"","size":439,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"silverstripe:master","ref":"master","sha":"9e57f2e3f3aeceae55e172c4518d64fc035fda20","user":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"repo":{"id":12417826,"name":"silverstripe-omnipay","full_name":"silverstripe/silverstripe-omnipay","owner":{"login":"silverstripe","id":379348,"avatar_url":"https://avatars.githubusercontent.com/u/379348?v=3","gravatar_id":"","url":"https://api.github.com/users/silverstripe","html_url":"https://github.com/silverstripe","followers_url":"https://api.github.com/users/silverstripe/followers","following_url":"https://api.github.com/users/silverstripe/following{/other_user}","gists_url":"https://api.github.com/users/silverstripe/gists{/gist_id}","starred_url":"https://api.github.com/users/silverstripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silverstripe/subscriptions","organizations_url":"https://api.github.com/users/silverstripe/orgs","repos_url":"https://api.github.com/users/silverstripe/repos","events_url":"https://api.github.com/users/silverstripe/events{/privacy}","received_events_url":"https://api.github.com/users/silverstripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silverstripe/silverstripe-omnipay","description":"SilverStripe integration with Omnipay PHP payments library.","fork":false,"url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay","forks_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/forks","keys_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/teams","hooks_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/hooks","issue_events_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/events{/number}","events_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/events","assignees_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/assignees{/user}","branches_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/branches{/branch}","tags_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/tags","blobs_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/git/refs{/sha}","trees_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/statuses/{sha}","languages_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/languages","stargazers_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/stargazers","contributors_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/contributors","subscribers_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/subscribers","subscription_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/subscription","commits_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/commits{/sha}","git_commits_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/git/commits{/sha}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/comments{/number}","issue_comment_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/comments{/number}","contents_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/contents/{+path}","compare_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/merges","archive_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/downloads","issues_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues{/number}","pulls_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls{/number}","milestones_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/milestones{/number}","notifications_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/labels{/name}","releases_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/releases{/id}","deployments_url":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/deployments","created_at":"2013-08-27T21:19:55Z","updated_at":"2016-11-04T14:55:41Z","pushed_at":"2016-11-11T09:17:41Z","git_url":"git://github.com/silverstripe/silverstripe-omnipay.git","ssh_url":"git@github.com:silverstripe/silverstripe-omnipay.git","clone_url":"https://github.com/silverstripe/silverstripe-omnipay.git","svn_url":"https://github.com/silverstripe/silverstripe-omnipay","homepage":"","size":562,"stargazers_count":29,"watchers_count":29,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":17,"forks":39,"open_issues":17,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151"},"html":{"href":"https://github.com/silverstripe/silverstripe-omnipay/pull/151"},"issue":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/151"},"comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/silverstripe/silverstripe-omnipay/statuses/5311be60c08cb49fc950eb1e626de12f54195b49"}}}}
{"actor":{"display_login":"zanderwar"}}