{"action":"created","comment":{"url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/comments/98050079","pull_request_review_id":18679927,"id":98050079,"diff_hunk":"@@ -60,32 +71,94 @@ def commit(order, message_type, trace_number=nil)\n                      })\n       end\n \n+      def build_new_order_xml(action, money, parameters = {})\n+        requires!(parameters, :order_id)\n+        xml = xml_envelope\n+        xml.tag! :Request do\n+          xml.tag! :NewOrder do\n+            add_xml_credentials(xml)\n+            # EC - Ecommerce transaction\n+            # RC - Recurring Payment transaction\n+            # MO - Mail Order Telephone Order transaction\n+            # IV - Interactive Voice Response\n+            # IN - Interactive Voice Response\n+            xml.tag! :IndustryType, parameters[:industry_type] || ECOMMERCE_TRANSACTION\n+            # A  - Auth Only No Capture\n+            # AC - Auth and Capture\n+            # F  - Force Auth No Capture and no online authorization\n+            # FR - Force Auth No Capture and no online authorization\n+            # FC - Force Auth and Capture no online authorization\n+            # R  - Refund and Capture no online authorization\n+            xml.tag! :MessageType, action\n+            add_bin_merchant_and_terminal(xml, parameters)\n+\n+            yield xml if block_given?\n+\n+            xml.tag! :OrderID, format_order_id(parameters[:order_id])\n+            xml.tag! :Amount, amount(money)\n+            xml.tag! :Comments, parameters[:comments] if parameters[:comments]\n+\n+            # Add additional card information for tokenized credit card that must be placed after the above three elements\n+            if action == AUTH_ONLY or action == AUTH_AND_CAPTURE","path":"lib/orbital/ext/active_merchant/active_merchant.rb","position":50,"original_position":50,"commit_id":"07e37baa22f106fa9b3ed42ec1564c90ab179028","original_commit_id":"07e37baa22f106fa9b3ed42ec1564c90ab179028","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":"Nit: I try to stay away from `or` since its low precedence can be confusing (non-issue here though).","created_at":"2017-01-26T17:49:20Z","updated_at":"2017-01-26T17:56:06Z","html_url":"https://github.com/killbill/killbill-orbital-plugin/pull/5#discussion_r98050079","pull_request_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/comments/98050079"},"html":{"href":"https://github.com/killbill/killbill-orbital-plugin/pull/5#discussion_r98050079"},"pull_request":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5","id":103200449,"html_url":"https://github.com/killbill/killbill-orbital-plugin/pull/5","diff_url":"https://github.com/killbill/killbill-orbital-plugin/pull/5.diff","patch_url":"https://github.com/killbill/killbill-orbital-plugin/pull/5.patch","issue_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues/5","number":5,"state":"open","locked":false,"title":"Upgrade API version and support network tokenized cc and credit operation","user":{"login":"daliwei","id":5861585,"avatar_url":"https://avatars.githubusercontent.com/u/5861585?v=3","gravatar_id":"","url":"https://api.github.com/users/daliwei","html_url":"https://github.com/daliwei","followers_url":"https://api.github.com/users/daliwei/followers","following_url":"https://api.github.com/users/daliwei/following{/other_user}","gists_url":"https://api.github.com/users/daliwei/gists{/gist_id}","starred_url":"https://api.github.com/users/daliwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daliwei/subscriptions","organizations_url":"https://api.github.com/users/daliwei/orgs","repos_url":"https://api.github.com/users/daliwei/repos","events_url":"https://api.github.com/users/daliwei/events{/privacy}","received_events_url":"https://api.github.com/users/daliwei/received_events","type":"User","site_admin":false},"body":"@pierre Please review. Thanks,","created_at":"2017-01-25T20:46:57Z","updated_at":"2017-01-26T17:56:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8dc8b582f882cbb3cbf8f42b99a3ce707aaf6f2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5/commits","review_comments_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5/comments","review_comment_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues/5/comments","statuses_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/statuses/07e37baa22f106fa9b3ed42ec1564c90ab179028","head":{"label":"daliwei:master","ref":"master","sha":"07e37baa22f106fa9b3ed42ec1564c90ab179028","user":{"login":"daliwei","id":5861585,"avatar_url":"https://avatars.githubusercontent.com/u/5861585?v=3","gravatar_id":"","url":"https://api.github.com/users/daliwei","html_url":"https://github.com/daliwei","followers_url":"https://api.github.com/users/daliwei/followers","following_url":"https://api.github.com/users/daliwei/following{/other_user}","gists_url":"https://api.github.com/users/daliwei/gists{/gist_id}","starred_url":"https://api.github.com/users/daliwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daliwei/subscriptions","organizations_url":"https://api.github.com/users/daliwei/orgs","repos_url":"https://api.github.com/users/daliwei/repos","events_url":"https://api.github.com/users/daliwei/events{/privacy}","received_events_url":"https://api.github.com/users/daliwei/received_events","type":"User","site_admin":false},"repo":{"id":61576259,"name":"killbill-orbital-plugin","full_name":"daliwei/killbill-orbital-plugin","owner":{"login":"daliwei","id":5861585,"avatar_url":"https://avatars.githubusercontent.com/u/5861585?v=3","gravatar_id":"","url":"https://api.github.com/users/daliwei","html_url":"https://github.com/daliwei","followers_url":"https://api.github.com/users/daliwei/followers","following_url":"https://api.github.com/users/daliwei/following{/other_user}","gists_url":"https://api.github.com/users/daliwei/gists{/gist_id}","starred_url":"https://api.github.com/users/daliwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daliwei/subscriptions","organizations_url":"https://api.github.com/users/daliwei/orgs","repos_url":"https://api.github.com/users/daliwei/repos","events_url":"https://api.github.com/users/daliwei/events{/privacy}","received_events_url":"https://api.github.com/users/daliwei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daliwei/killbill-orbital-plugin","description":"Plugin to use Orbital as a gateway","fork":true,"url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin","forks_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/forks","keys_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/teams","hooks_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/hooks","issue_events_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/events","assignees_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/tags","blobs_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/languages","stargazers_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/stargazers","contributors_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/contributors","subscribers_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/subscribers","subscription_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/subscription","commits_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/merges","archive_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/downloads","issues_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/labels{/name}","releases_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/daliwei/killbill-orbital-plugin/deployments","created_at":"2016-06-20T19:58:13Z","updated_at":"2016-06-20T19:58:15Z","pushed_at":"2017-01-26T00:15:38Z","git_url":"git://github.com/daliwei/killbill-orbital-plugin.git","ssh_url":"git@github.com:daliwei/killbill-orbital-plugin.git","clone_url":"https://github.com/daliwei/killbill-orbital-plugin.git","svn_url":"https://github.com/daliwei/killbill-orbital-plugin","homepage":null,"size":59,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"3a5135e2ad2bd73bb6e26e628242fb90ac7e7307","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":52034349,"name":"killbill-orbital-plugin","full_name":"killbill/killbill-orbital-plugin","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-orbital-plugin","description":"Plugin to use Orbital as a gateway","fork":false,"url":"https://api.github.com/repos/killbill/killbill-orbital-plugin","forks_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/forks","keys_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/teams","hooks_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/hooks","issue_events_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/events","assignees_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/tags","blobs_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/languages","stargazers_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/stargazers","contributors_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/contributors","subscribers_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/subscribers","subscription_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/subscription","commits_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/merges","archive_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/downloads","issues_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/labels{/name}","releases_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/killbill/killbill-orbital-plugin/deployments","created_at":"2016-02-18T19:53:41Z","updated_at":"2016-11-29T19:45:56Z","pushed_at":"2017-01-26T00:15:40Z","git_url":"git://github.com/killbill/killbill-orbital-plugin.git","ssh_url":"git@github.com:killbill/killbill-orbital-plugin.git","clone_url":"https://github.com/killbill/killbill-orbital-plugin.git","svn_url":"https://github.com/killbill/killbill-orbital-plugin","homepage":"http://killbill.io","size":44,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5"},"html":{"href":"https://github.com/killbill/killbill-orbital-plugin/pull/5"},"issue":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues/5"},"comments":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/killbill/killbill-orbital-plugin/statuses/07e37baa22f106fa9b3ed42ec1564c90ab179028"}}}}
{"actor":{"display_login":"pierre"}}