{"action":"created","comment":{"url":"https://api.github.com/repos/activemerchant/active_merchant/pulls/comments/69586192","id":69586192,"diff_hunk":"@@ -0,0 +1,393 @@\n+require 'digest/md5'\n+\n+module ActiveMerchant #:nodoc:\n+  module Billing #:nodoc:\n+    class PayuLatamGateway < Gateway\n+      self.display_name = \"PayU Latam\"\n+      self.homepage_url = \"http://www.payulatam.com\"\n+\n+      self.test_url = \"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi\"\n+      self.live_url = \"https://api.payulatam.com/payments-api/4.0/service.cgi\"\n+\n+      self.supported_countries = [\"AR\", \"BR\", \"CO\", \"MX\", \"PA\", \"PE\"]\n+      self.default_currency = \"USD\"\n+      self.money_format = :dollars\n+      self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]\n+\n+      BRAND_MAP = {\n+        \"visa\" => \"VISA\",\n+        \"master\" => \"MASTERCARD\",\n+        \"american_express\" => \"AMEX\",\n+        \"diners_club\" => \"DINERS\"\n+      }\n+\n+      def initialize(options={})\n+        requires!(options, :merchant_id, :account_id, :api_login, :api_key)\n+        super\n+      end\n+\n+      def purchase(amount, payment_method, options={})\n+        post = {}\n+\n+        add_credentials(post, 'SUBMIT_TRANSACTION')","path":"lib/active_merchant/billing/gateways/payu_latam.rb","position":32,"original_position":32,"commit_id":"b7a81443308fdd5dc55214b5463baebea392ef43","original_commit_id":"b7a81443308fdd5dc55214b5463baebea392ef43","user":{"login":"duff","id":2437,"avatar_url":"https://avatars.githubusercontent.com/u/2437?v=3","gravatar_id":"","url":"https://api.github.com/users/duff","html_url":"https://github.com/duff","followers_url":"https://api.github.com/users/duff/followers","following_url":"https://api.github.com/users/duff/following{/other_user}","gists_url":"https://api.github.com/users/duff/gists{/gist_id}","starred_url":"https://api.github.com/users/duff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duff/subscriptions","organizations_url":"https://api.github.com/users/duff/orgs","repos_url":"https://api.github.com/users/duff/repos","events_url":"https://api.github.com/users/duff/events{/privacy}","received_events_url":"https://api.github.com/users/duff/received_events","type":"User","site_admin":false},"body":"Looks like there's some logic that shows up in `purchase` and `authorize`.  Perhaps it can be refactored a bit to DRY things up some.","created_at":"2016-07-05T15:41:26Z","updated_at":"2016-07-05T15:41:26Z","html_url":"https://github.com/activemerchant/active_merchant/pull/2113#discussion_r69586192","pull_request_url":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113","_links":{"self":{"href":"https://api.github.com/repos/activemerchant/active_merchant/pulls/comments/69586192"},"html":{"href":"https://github.com/activemerchant/active_merchant/pull/2113#discussion_r69586192"},"pull_request":{"href":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113"}}},"pull_request":{"url":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113","id":71295293,"html_url":"https://github.com/activemerchant/active_merchant/pull/2113","diff_url":"https://github.com/activemerchant/active_merchant/pull/2113.diff","patch_url":"https://github.com/activemerchant/active_merchant/pull/2113.patch","issue_url":"https://api.github.com/repos/activemerchant/active_merchant/issues/2113","number":2113,"state":"open","locked":false,"title":"PayU Latam: Add new gateway","user":{"login":"shasum","id":4900443,"avatar_url":"https://avatars.githubusercontent.com/u/4900443?v=3","gravatar_id":"","url":"https://api.github.com/users/shasum","html_url":"https://github.com/shasum","followers_url":"https://api.github.com/users/shasum/followers","following_url":"https://api.github.com/users/shasum/following{/other_user}","gists_url":"https://api.github.com/users/shasum/gists{/gist_id}","starred_url":"https://api.github.com/users/shasum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shasum/subscriptions","organizations_url":"https://api.github.com/users/shasum/orgs","repos_url":"https://api.github.com/users/shasum/repos","events_url":"https://api.github.com/users/shasum/events{/privacy}","received_events_url":"https://api.github.com/users/shasum/received_events","type":"User","site_admin":false},"body":"@duff only purchase and authorize works in sandbox","created_at":"2016-05-24T21:23:34Z","updated_at":"2016-07-05T15:41:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08300af10114addb889e57ff9166ddb0d35271af","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113/commits","review_comments_url":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113/comments","review_comment_url":"https://api.github.com/repos/activemerchant/active_merchant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/activemerchant/active_merchant/issues/2113/comments","statuses_url":"https://api.github.com/repos/activemerchant/active_merchant/statuses/b7a81443308fdd5dc55214b5463baebea392ef43","head":{"label":"shasum:feat/payu-latam","ref":"feat/payu-latam","sha":"b7a81443308fdd5dc55214b5463baebea392ef43","user":{"login":"shasum","id":4900443,"avatar_url":"https://avatars.githubusercontent.com/u/4900443?v=3","gravatar_id":"","url":"https://api.github.com/users/shasum","html_url":"https://github.com/shasum","followers_url":"https://api.github.com/users/shasum/followers","following_url":"https://api.github.com/users/shasum/following{/other_user}","gists_url":"https://api.github.com/users/shasum/gists{/gist_id}","starred_url":"https://api.github.com/users/shasum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shasum/subscriptions","organizations_url":"https://api.github.com/users/shasum/orgs","repos_url":"https://api.github.com/users/shasum/repos","events_url":"https://api.github.com/users/shasum/events{/privacy}","received_events_url":"https://api.github.com/users/shasum/received_events","type":"User","site_admin":false},"repo":{"id":53851941,"name":"active_merchant","full_name":"shasum/active_merchant","owner":{"login":"shasum","id":4900443,"avatar_url":"https://avatars.githubusercontent.com/u/4900443?v=3","gravatar_id":"","url":"https://api.github.com/users/shasum","html_url":"https://github.com/shasum","followers_url":"https://api.github.com/users/shasum/followers","following_url":"https://api.github.com/users/shasum/following{/other_user}","gists_url":"https://api.github.com/users/shasum/gists{/gist_id}","starred_url":"https://api.github.com/users/shasum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shasum/subscriptions","organizations_url":"https://api.github.com/users/shasum/orgs","repos_url":"https://api.github.com/users/shasum/repos","events_url":"https://api.github.com/users/shasum/events{/privacy}","received_events_url":"https://api.github.com/users/shasum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shasum/active_merchant","description":"Active Merchant is a simple payment abstraction library extracted from Shopify. The aim of the project is to feel natural to Ruby users and to abstract as many parts as possible away from the user to offer a consistent interface across all supported gateways.","fork":true,"url":"https://api.github.com/repos/shasum/active_merchant","forks_url":"https://api.github.com/repos/shasum/active_merchant/forks","keys_url":"https://api.github.com/repos/shasum/active_merchant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shasum/active_merchant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shasum/active_merchant/teams","hooks_url":"https://api.github.com/repos/shasum/active_merchant/hooks","issue_events_url":"https://api.github.com/repos/shasum/active_merchant/issues/events{/number}","events_url":"https://api.github.com/repos/shasum/active_merchant/events","assignees_url":"https://api.github.com/repos/shasum/active_merchant/assignees{/user}","branches_url":"https://api.github.com/repos/shasum/active_merchant/branches{/branch}","tags_url":"https://api.github.com/repos/shasum/active_merchant/tags","blobs_url":"https://api.github.com/repos/shasum/active_merchant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shasum/active_merchant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shasum/active_merchant/git/refs{/sha}","trees_url":"https://api.github.com/repos/shasum/active_merchant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shasum/active_merchant/statuses/{sha}","languages_url":"https://api.github.com/repos/shasum/active_merchant/languages","stargazers_url":"https://api.github.com/repos/shasum/active_merchant/stargazers","contributors_url":"https://api.github.com/repos/shasum/active_merchant/contributors","subscribers_url":"https://api.github.com/repos/shasum/active_merchant/subscribers","subscription_url":"https://api.github.com/repos/shasum/active_merchant/subscription","commits_url":"https://api.github.com/repos/shasum/active_merchant/commits{/sha}","git_commits_url":"https://api.github.com/repos/shasum/active_merchant/git/commits{/sha}","comments_url":"https://api.github.com/repos/shasum/active_merchant/comments{/number}","issue_comment_url":"https://api.github.com/repos/shasum/active_merchant/issues/comments{/number}","contents_url":"https://api.github.com/repos/shasum/active_merchant/contents/{+path}","compare_url":"https://api.github.com/repos/shasum/active_merchant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shasum/active_merchant/merges","archive_url":"https://api.github.com/repos/shasum/active_merchant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shasum/active_merchant/downloads","issues_url":"https://api.github.com/repos/shasum/active_merchant/issues{/number}","pulls_url":"https://api.github.com/repos/shasum/active_merchant/pulls{/number}","milestones_url":"https://api.github.com/repos/shasum/active_merchant/milestones{/number}","notifications_url":"https://api.github.com/repos/shasum/active_merchant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shasum/active_merchant/labels{/name}","releases_url":"https://api.github.com/repos/shasum/active_merchant/releases{/id}","deployments_url":"https://api.github.com/repos/shasum/active_merchant/deployments","created_at":"2016-03-14T11:46:45Z","updated_at":"2016-03-14T11:46:49Z","pushed_at":"2016-06-29T09:50:37Z","git_url":"git://github.com/shasum/active_merchant.git","ssh_url":"git@github.com:shasum/active_merchant.git","clone_url":"https://github.com/shasum/active_merchant.git","svn_url":"https://github.com/shasum/active_merchant","homepage":"http://activemerchant.org","size":14273,"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":"activemerchant:master","ref":"master","sha":"9ed7dd61dd2975fb738068dcf7c8def71e66d40e","user":{"login":"activemerchant","id":12955944,"avatar_url":"https://avatars.githubusercontent.com/u/12955944?v=3","gravatar_id":"","url":"https://api.github.com/users/activemerchant","html_url":"https://github.com/activemerchant","followers_url":"https://api.github.com/users/activemerchant/followers","following_url":"https://api.github.com/users/activemerchant/following{/other_user}","gists_url":"https://api.github.com/users/activemerchant/gists{/gist_id}","starred_url":"https://api.github.com/users/activemerchant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activemerchant/subscriptions","organizations_url":"https://api.github.com/users/activemerchant/orgs","repos_url":"https://api.github.com/users/activemerchant/repos","events_url":"https://api.github.com/users/activemerchant/events{/privacy}","received_events_url":"https://api.github.com/users/activemerchant/received_events","type":"Organization","site_admin":false},"repo":{"id":18294,"name":"active_merchant","full_name":"activemerchant/active_merchant","owner":{"login":"activemerchant","id":12955944,"avatar_url":"https://avatars.githubusercontent.com/u/12955944?v=3","gravatar_id":"","url":"https://api.github.com/users/activemerchant","html_url":"https://github.com/activemerchant","followers_url":"https://api.github.com/users/activemerchant/followers","following_url":"https://api.github.com/users/activemerchant/following{/other_user}","gists_url":"https://api.github.com/users/activemerchant/gists{/gist_id}","starred_url":"https://api.github.com/users/activemerchant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activemerchant/subscriptions","organizations_url":"https://api.github.com/users/activemerchant/orgs","repos_url":"https://api.github.com/users/activemerchant/repos","events_url":"https://api.github.com/users/activemerchant/events{/privacy}","received_events_url":"https://api.github.com/users/activemerchant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activemerchant/active_merchant","description":"Active Merchant is a simple payment abstraction library extracted from Shopify. The aim of the project is to feel natural to Ruby users and to abstract as many parts as possible away from the user to offer a consistent interface across all supported gateways.","fork":false,"url":"https://api.github.com/repos/activemerchant/active_merchant","forks_url":"https://api.github.com/repos/activemerchant/active_merchant/forks","keys_url":"https://api.github.com/repos/activemerchant/active_merchant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activemerchant/active_merchant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activemerchant/active_merchant/teams","hooks_url":"https://api.github.com/repos/activemerchant/active_merchant/hooks","issue_events_url":"https://api.github.com/repos/activemerchant/active_merchant/issues/events{/number}","events_url":"https://api.github.com/repos/activemerchant/active_merchant/events","assignees_url":"https://api.github.com/repos/activemerchant/active_merchant/assignees{/user}","branches_url":"https://api.github.com/repos/activemerchant/active_merchant/branches{/branch}","tags_url":"https://api.github.com/repos/activemerchant/active_merchant/tags","blobs_url":"https://api.github.com/repos/activemerchant/active_merchant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activemerchant/active_merchant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activemerchant/active_merchant/git/refs{/sha}","trees_url":"https://api.github.com/repos/activemerchant/active_merchant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activemerchant/active_merchant/statuses/{sha}","languages_url":"https://api.github.com/repos/activemerchant/active_merchant/languages","stargazers_url":"https://api.github.com/repos/activemerchant/active_merchant/stargazers","contributors_url":"https://api.github.com/repos/activemerchant/active_merchant/contributors","subscribers_url":"https://api.github.com/repos/activemerchant/active_merchant/subscribers","subscription_url":"https://api.github.com/repos/activemerchant/active_merchant/subscription","commits_url":"https://api.github.com/repos/activemerchant/active_merchant/commits{/sha}","git_commits_url":"https://api.github.com/repos/activemerchant/active_merchant/git/commits{/sha}","comments_url":"https://api.github.com/repos/activemerchant/active_merchant/comments{/number}","issue_comment_url":"https://api.github.com/repos/activemerchant/active_merchant/issues/comments{/number}","contents_url":"https://api.github.com/repos/activemerchant/active_merchant/contents/{+path}","compare_url":"https://api.github.com/repos/activemerchant/active_merchant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activemerchant/active_merchant/merges","archive_url":"https://api.github.com/repos/activemerchant/active_merchant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activemerchant/active_merchant/downloads","issues_url":"https://api.github.com/repos/activemerchant/active_merchant/issues{/number}","pulls_url":"https://api.github.com/repos/activemerchant/active_merchant/pulls{/number}","milestones_url":"https://api.github.com/repos/activemerchant/active_merchant/milestones{/number}","notifications_url":"https://api.github.com/repos/activemerchant/active_merchant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activemerchant/active_merchant/labels{/name}","releases_url":"https://api.github.com/repos/activemerchant/active_merchant/releases{/id}","deployments_url":"https://api.github.com/repos/activemerchant/active_merchant/deployments","created_at":"2008-05-20T13:53:26Z","updated_at":"2016-07-05T10:47:58Z","pushed_at":"2016-07-05T15:37:33Z","git_url":"git://github.com/activemerchant/active_merchant.git","ssh_url":"git@github.com:activemerchant/active_merchant.git","clone_url":"https://github.com/activemerchant/active_merchant.git","svn_url":"https://github.com/activemerchant/active_merchant","homepage":"http://activemerchant.org","size":25242,"stargazers_count":3363,"watchers_count":3363,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1898,"mirror_url":null,"open_issues_count":96,"forks":1898,"open_issues":96,"watchers":3363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113"},"html":{"href":"https://github.com/activemerchant/active_merchant/pull/2113"},"issue":{"href":"https://api.github.com/repos/activemerchant/active_merchant/issues/2113"},"comments":{"href":"https://api.github.com/repos/activemerchant/active_merchant/issues/2113/comments"},"review_comments":{"href":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113/comments"},"review_comment":{"href":"https://api.github.com/repos/activemerchant/active_merchant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/activemerchant/active_merchant/pulls/2113/commits"},"statuses":{"href":"https://api.github.com/repos/activemerchant/active_merchant/statuses/b7a81443308fdd5dc55214b5463baebea392ef43"}}}}
{"actor":{"display_login":"duff"}}