{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/active_merchant/pulls/comments/31166319","id":31166319,"diff_hunk":"@@ -0,0 +1,234 @@\n+# encoding: utf-8\n+\n+module ActiveMerchant #:nodoc:\n+  module Billing #:nodoc:\n+    class PayuInGateway < Gateway\n+      self.test_url = \"https://test.payu.in/_payment\"\n+      self.live_url = \"https://secure.payu.in/_payment\"\n+\n+      TEST_INFO_URL = \"https://test.payu.in/merchant/postservice.php?form=2\"\n+      LIVE_INFO_URL = \"https://info.payu.in/merchant/postservice.php?form=2\"\n+\n+      self.supported_countries = ['IN']\n+      self.default_currency = 'INR'\n+      self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]\n+\n+      self.homepage_url = 'https://www.payu.in/'\n+      self.display_name = 'PayU India'\n+\n+      def initialize(options={})\n+        requires!(options, :key, :salt)\n+        super\n+      end\n+\n+      def purchase(money, payment, options={})\n+        requires!(options, :order_id)\n+\n+        post = {}\n+        add_invoice(post, money, options)\n+        add_payment(post, payment)\n+        add_addresses(post, options)\n+        add_customer_data(post, options)\n+        add_auth(post)\n+\n+        MultiResponse.run do |r|\n+          r.process{commit(url(\"purchase\"), post)}\n+          if(r.params[\"enrolled\"].to_s == \"0\")\n+            r.process{commit(r.params[\"post_uri\"], r.params[\"form_post_vars\"])}","path":"lib/active_merchant/billing/gateways/payu_in.rb","position":37,"original_position":37,"commit_id":"b2cb10bc1effe9718fecf8777f20c91c0d5fb399","original_commit_id":"b2cb10bc1effe9718fecf8777f20c91c0d5fb399","user":{"login":"rwdaigle","id":1012,"avatar_url":"https://avatars.githubusercontent.com/u/1012?v=3","gravatar_id":"","url":"https://api.github.com/users/rwdaigle","html_url":"https://github.com/rwdaigle","followers_url":"https://api.github.com/users/rwdaigle/followers","following_url":"https://api.github.com/users/rwdaigle/following{/other_user}","gists_url":"https://api.github.com/users/rwdaigle/gists{/gist_id}","starred_url":"https://api.github.com/users/rwdaigle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwdaigle/subscriptions","organizations_url":"https://api.github.com/users/rwdaigle/orgs","repos_url":"https://api.github.com/users/rwdaigle/repos","events_url":"https://api.github.com/users/rwdaigle/events{/privacy}","received_events_url":"https://api.github.com/users/rwdaigle/received_events","type":"User","site_admin":false},"body":"So if they're not 3DS enrolled, we POST back to a URL they give us, using params they give us? Is there value in this flow I don't understand, or is it a silly API?","created_at":"2015-05-27T18:41:25Z","updated_at":"2015-05-27T18:41:25Z","html_url":"https://github.com/Shopify/active_merchant/pull/1711#discussion_r31166319","pull_request_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711","_links":{"self":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/comments/31166319"},"html":{"href":"https://github.com/Shopify/active_merchant/pull/1711#discussion_r31166319"},"pull_request":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711","id":36333245,"html_url":"https://github.com/Shopify/active_merchant/pull/1711","diff_url":"https://github.com/Shopify/active_merchant/pull/1711.diff","patch_url":"https://github.com/Shopify/active_merchant/pull/1711.patch","issue_url":"https://api.github.com/repos/Shopify/active_merchant/issues/1711","number":1711,"state":"open","locked":false,"title":"Add PayU (India) gateway","user":{"login":"ntalbott","id":223,"avatar_url":"https://avatars.githubusercontent.com/u/223?v=3","gravatar_id":"","url":"https://api.github.com/users/ntalbott","html_url":"https://github.com/ntalbott","followers_url":"https://api.github.com/users/ntalbott/followers","following_url":"https://api.github.com/users/ntalbott/following{/other_user}","gists_url":"https://api.github.com/users/ntalbott/gists{/gist_id}","starred_url":"https://api.github.com/users/ntalbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntalbott/subscriptions","organizations_url":"https://api.github.com/users/ntalbott/orgs","repos_url":"https://api.github.com/users/ntalbott/repos","events_url":"https://api.github.com/users/ntalbott/events{/privacy}","received_events_url":"https://api.github.com/users/ntalbott/received_events","type":"User","site_admin":false},"body":"https://www.payu.in/\r\n\r\nThis is primarily a 3D-secure gateway, but can work with un-enrolled cards if correctly configured by PayU.","created_at":"2015-05-27T18:23:06Z","updated_at":"2015-05-27T18:41:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75d3d8616b246db18cc3dd41b838e759c685e5a7","assignee":{"login":"ntalbott","id":223,"avatar_url":"https://avatars.githubusercontent.com/u/223?v=3","gravatar_id":"","url":"https://api.github.com/users/ntalbott","html_url":"https://github.com/ntalbott","followers_url":"https://api.github.com/users/ntalbott/followers","following_url":"https://api.github.com/users/ntalbott/following{/other_user}","gists_url":"https://api.github.com/users/ntalbott/gists{/gist_id}","starred_url":"https://api.github.com/users/ntalbott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntalbott/subscriptions","organizations_url":"https://api.github.com/users/ntalbott/orgs","repos_url":"https://api.github.com/users/ntalbott/repos","events_url":"https://api.github.com/users/ntalbott/events{/privacy}","received_events_url":"https://api.github.com/users/ntalbott/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711/commits","review_comments_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711/comments","review_comment_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/active_merchant/issues/1711/comments","statuses_url":"https://api.github.com/repos/Shopify/active_merchant/statuses/b2cb10bc1effe9718fecf8777f20c91c0d5fb399","head":{"label":"spreedly:payu-in","ref":"payu-in","sha":"b2cb10bc1effe9718fecf8777f20c91c0d5fb399","user":{"login":"spreedly","id":178292,"avatar_url":"https://avatars.githubusercontent.com/u/178292?v=3","gravatar_id":"","url":"https://api.github.com/users/spreedly","html_url":"https://github.com/spreedly","followers_url":"https://api.github.com/users/spreedly/followers","following_url":"https://api.github.com/users/spreedly/following{/other_user}","gists_url":"https://api.github.com/users/spreedly/gists{/gist_id}","starred_url":"https://api.github.com/users/spreedly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spreedly/subscriptions","organizations_url":"https://api.github.com/users/spreedly/orgs","repos_url":"https://api.github.com/users/spreedly/repos","events_url":"https://api.github.com/users/spreedly/events{/privacy}","received_events_url":"https://api.github.com/users/spreedly/received_events","type":"Organization","site_admin":false},"repo":{"id":18573681,"name":"active_merchant","full_name":"spreedly/active_merchant","owner":{"login":"spreedly","id":178292,"avatar_url":"https://avatars.githubusercontent.com/u/178292?v=3","gravatar_id":"","url":"https://api.github.com/users/spreedly","html_url":"https://github.com/spreedly","followers_url":"https://api.github.com/users/spreedly/followers","following_url":"https://api.github.com/users/spreedly/following{/other_user}","gists_url":"https://api.github.com/users/spreedly/gists{/gist_id}","starred_url":"https://api.github.com/users/spreedly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spreedly/subscriptions","organizations_url":"https://api.github.com/users/spreedly/orgs","repos_url":"https://api.github.com/users/spreedly/repos","events_url":"https://api.github.com/users/spreedly/events{/privacy}","received_events_url":"https://api.github.com/users/spreedly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spreedly/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/spreedly/active_merchant","forks_url":"https://api.github.com/repos/spreedly/active_merchant/forks","keys_url":"https://api.github.com/repos/spreedly/active_merchant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spreedly/active_merchant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spreedly/active_merchant/teams","hooks_url":"https://api.github.com/repos/spreedly/active_merchant/hooks","issue_events_url":"https://api.github.com/repos/spreedly/active_merchant/issues/events{/number}","events_url":"https://api.github.com/repos/spreedly/active_merchant/events","assignees_url":"https://api.github.com/repos/spreedly/active_merchant/assignees{/user}","branches_url":"https://api.github.com/repos/spreedly/active_merchant/branches{/branch}","tags_url":"https://api.github.com/repos/spreedly/active_merchant/tags","blobs_url":"https://api.github.com/repos/spreedly/active_merchant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spreedly/active_merchant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spreedly/active_merchant/git/refs{/sha}","trees_url":"https://api.github.com/repos/spreedly/active_merchant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spreedly/active_merchant/statuses/{sha}","languages_url":"https://api.github.com/repos/spreedly/active_merchant/languages","stargazers_url":"https://api.github.com/repos/spreedly/active_merchant/stargazers","contributors_url":"https://api.github.com/repos/spreedly/active_merchant/contributors","subscribers_url":"https://api.github.com/repos/spreedly/active_merchant/subscribers","subscription_url":"https://api.github.com/repos/spreedly/active_merchant/subscription","commits_url":"https://api.github.com/repos/spreedly/active_merchant/commits{/sha}","git_commits_url":"https://api.github.com/repos/spreedly/active_merchant/git/commits{/sha}","comments_url":"https://api.github.com/repos/spreedly/active_merchant/comments{/number}","issue_comment_url":"https://api.github.com/repos/spreedly/active_merchant/issues/comments{/number}","contents_url":"https://api.github.com/repos/spreedly/active_merchant/contents/{+path}","compare_url":"https://api.github.com/repos/spreedly/active_merchant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spreedly/active_merchant/merges","archive_url":"https://api.github.com/repos/spreedly/active_merchant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spreedly/active_merchant/downloads","issues_url":"https://api.github.com/repos/spreedly/active_merchant/issues{/number}","pulls_url":"https://api.github.com/repos/spreedly/active_merchant/pulls{/number}","milestones_url":"https://api.github.com/repos/spreedly/active_merchant/milestones{/number}","notifications_url":"https://api.github.com/repos/spreedly/active_merchant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spreedly/active_merchant/labels{/name}","releases_url":"https://api.github.com/repos/spreedly/active_merchant/releases{/id}","created_at":"2014-04-08T20:20:50Z","updated_at":"2015-04-07T11:46:06Z","pushed_at":"2015-05-27T18:20:34Z","git_url":"git://github.com/spreedly/active_merchant.git","ssh_url":"git@github.com:spreedly/active_merchant.git","clone_url":"https://github.com/spreedly/active_merchant.git","svn_url":"https://github.com/spreedly/active_merchant","homepage":"http://activemerchant.org","size":12428,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"a7ba32f719b7255843c2a0baf19c5f3654e2a2f4","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":18294,"name":"active_merchant","full_name":"Shopify/active_merchant","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/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/Shopify/active_merchant","forks_url":"https://api.github.com/repos/Shopify/active_merchant/forks","keys_url":"https://api.github.com/repos/Shopify/active_merchant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/active_merchant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/active_merchant/teams","hooks_url":"https://api.github.com/repos/Shopify/active_merchant/hooks","issue_events_url":"https://api.github.com/repos/Shopify/active_merchant/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/active_merchant/events","assignees_url":"https://api.github.com/repos/Shopify/active_merchant/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/active_merchant/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/active_merchant/tags","blobs_url":"https://api.github.com/repos/Shopify/active_merchant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/active_merchant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/active_merchant/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/active_merchant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/active_merchant/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/active_merchant/languages","stargazers_url":"https://api.github.com/repos/Shopify/active_merchant/stargazers","contributors_url":"https://api.github.com/repos/Shopify/active_merchant/contributors","subscribers_url":"https://api.github.com/repos/Shopify/active_merchant/subscribers","subscription_url":"https://api.github.com/repos/Shopify/active_merchant/subscription","commits_url":"https://api.github.com/repos/Shopify/active_merchant/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/active_merchant/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/active_merchant/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/active_merchant/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/active_merchant/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/active_merchant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/active_merchant/merges","archive_url":"https://api.github.com/repos/Shopify/active_merchant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/active_merchant/downloads","issues_url":"https://api.github.com/repos/Shopify/active_merchant/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/active_merchant/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/active_merchant/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/active_merchant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/active_merchant/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/active_merchant/releases{/id}","created_at":"2008-05-20T13:53:26Z","updated_at":"2015-05-27T05:59:38Z","pushed_at":"2015-05-27T18:23:06Z","git_url":"git://github.com/Shopify/active_merchant.git","ssh_url":"git@github.com:Shopify/active_merchant.git","clone_url":"https://github.com/Shopify/active_merchant.git","svn_url":"https://github.com/Shopify/active_merchant","homepage":"http://activemerchant.org","size":36259,"stargazers_count":3059,"watchers_count":3059,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1689,"mirror_url":null,"open_issues_count":53,"forks":1689,"open_issues":53,"watchers":3059,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711"},"html":{"href":"https://github.com/Shopify/active_merchant/pull/1711"},"issue":{"href":"https://api.github.com/repos/Shopify/active_merchant/issues/1711"},"comments":{"href":"https://api.github.com/repos/Shopify/active_merchant/issues/1711/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1711/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/active_merchant/statuses/b2cb10bc1effe9718fecf8777f20c91c0d5fb399"}}}}