{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/active_merchant/pulls/comments/26101281","id":26101281,"diff_hunk":"@@ -0,0 +1,314 @@\n+require 'nokogiri'\n+\n+module ActiveMerchant #:nodoc:\n+  module Billing #:nodoc:\n+    #\n+    # == Monei gateway\n+    # This class implements Monei gateway for Active Merchant. For more information about Monei\n+    # gateway please go to http://www.monei.net\n+    #\n+    # === Setup\n+    # In order to set-up the gateway you need four paramaters: sender_id, channel_id, login and pwd.\n+    # Request that data to Monei.\n+    class MoneiGateway < Gateway\n+      self.test_url = 'https://test.monei-api.net/payment/ctpe'\n+      self.live_url = 'https://monei-api.net/payment/ctpe'\n+\n+      self.supported_countries = ['ES']\n+      self.default_currency = 'EUR'\n+      self.supported_cardtypes = [:visa, :master, :maestro, :jcb, :american_express]\n+\n+      self.homepage_url = 'http://www.monei.net/'\n+      self.display_name = 'Monei'\n+\n+      # Constructor\n+      #\n+      # options - Hash containing the gateway credentials, ALL MANDATORY\n+      #           :sender_id  Sender ID\n+      #           :channel_id Channel ID\n+      #           :login      User login\n+      #           :pwd        User password\n+      #\n+      def initialize(options={})\n+        requires!(options, :sender_id, :channel_id, :login, :pwd)\n+        super\n+      end\n+\n+      # Public: Performs purchase operation\n+      #\n+      # money       - Amount of purchase\n+      # credit_card - Credit card\n+      # options     - Hash containing purchase options\n+      #               :order_id         Merchant created id for the purchase\n+      #               :billing_address  Hash with billing address information\n+      #               :description      Merchant created purchase description (optional)\n+      #               :currency         Sale currency to override money object or default (optional)\n+      #               :given            Customer given name to override card holder's (optional)","path":"lib/active_merchant/billing/gateways/monei.rb","position":null,"original_position":46,"commit_id":"4482bfd9cd3930c35d1d8b579c26bc37c8c1adf2","original_commit_id":"79e97cc8640119d698823d3691356b7854a255cc","user":{"login":"leolara","id":1210482,"avatar_url":"https://avatars.githubusercontent.com/u/1210482?v=3","gravatar_id":"","url":"https://api.github.com/users/leolara","html_url":"https://github.com/leolara","followers_url":"https://api.github.com/users/leolara/followers","following_url":"https://api.github.com/users/leolara/following{/other_user}","gists_url":"https://api.github.com/users/leolara/gists{/gist_id}","starred_url":"https://api.github.com/users/leolara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leolara/subscriptions","organizations_url":"https://api.github.com/users/leolara/orgs","repos_url":"https://api.github.com/users/leolara/repos","events_url":"https://api.github.com/users/leolara/events{/privacy}","received_events_url":"https://api.github.com/users/leolara/received_events","type":"User","site_admin":false},"body":"ok, I understand that I should remove the options to override first_name and last_name, both will be taken only from the `credit_card` object.","created_at":"2015-03-10T06:33:11Z","updated_at":"2015-03-10T06:33:11Z","html_url":"https://github.com/Shopify/active_merchant/pull/1556#discussion_r26101281","pull_request_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556","_links":{"self":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/comments/26101281"},"html":{"href":"https://github.com/Shopify/active_merchant/pull/1556#discussion_r26101281"},"pull_request":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556","id":28715500,"html_url":"https://github.com/Shopify/active_merchant/pull/1556","diff_url":"https://github.com/Shopify/active_merchant/pull/1556.diff","patch_url":"https://github.com/Shopify/active_merchant/pull/1556.patch","issue_url":"https://api.github.com/repos/Shopify/active_merchant/issues/1556","number":1556,"state":"open","locked":false,"title":"Implementation of Monei.net gateway for AM","user":{"login":"leolara","id":1210482,"avatar_url":"https://avatars.githubusercontent.com/u/1210482?v=3","gravatar_id":"","url":"https://api.github.com/users/leolara","html_url":"https://github.com/leolara","followers_url":"https://api.github.com/users/leolara/followers","following_url":"https://api.github.com/users/leolara/following{/other_user}","gists_url":"https://api.github.com/users/leolara/gists{/gist_id}","starred_url":"https://api.github.com/users/leolara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leolara/subscriptions","organizations_url":"https://api.github.com/users/leolara/orgs","repos_url":"https://api.github.com/users/leolara/repos","events_url":"https://api.github.com/users/leolara/events{/privacy}","received_events_url":"https://api.github.com/users/leolara/received_events","type":"User","site_admin":false},"body":"This an implementation of the Monei.net gateway for active merchant.\r\n\r\nThe goal is to be a Shopify gateway for Spain.\r\n\r\n@alexandresaiz (Alexandre Saiz) has been talking about this from the business said with Louis Kearns of Shopify.\r\n\r\nPlease, have a look and let me know if there are any problems with the code.","created_at":"2015-02-05T11:00:40Z","updated_at":"2015-03-10T06:33:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad992ff617d5e5ef0159fb3e2f775a6dd99b2049","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556/commits","review_comments_url":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556/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/1556/comments","statuses_url":"https://api.github.com/repos/Shopify/active_merchant/statuses/4482bfd9cd3930c35d1d8b579c26bc37c8c1adf2","head":{"label":"leolara:monei-gw","ref":"monei-gw","sha":"4482bfd9cd3930c35d1d8b579c26bc37c8c1adf2","user":{"login":"leolara","id":1210482,"avatar_url":"https://avatars.githubusercontent.com/u/1210482?v=3","gravatar_id":"","url":"https://api.github.com/users/leolara","html_url":"https://github.com/leolara","followers_url":"https://api.github.com/users/leolara/followers","following_url":"https://api.github.com/users/leolara/following{/other_user}","gists_url":"https://api.github.com/users/leolara/gists{/gist_id}","starred_url":"https://api.github.com/users/leolara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leolara/subscriptions","organizations_url":"https://api.github.com/users/leolara/orgs","repos_url":"https://api.github.com/users/leolara/repos","events_url":"https://api.github.com/users/leolara/events{/privacy}","received_events_url":"https://api.github.com/users/leolara/received_events","type":"User","site_admin":false},"repo":{"id":24289473,"name":"active_merchant","full_name":"leolara/active_merchant","owner":{"login":"leolara","id":1210482,"avatar_url":"https://avatars.githubusercontent.com/u/1210482?v=3","gravatar_id":"","url":"https://api.github.com/users/leolara","html_url":"https://github.com/leolara","followers_url":"https://api.github.com/users/leolara/followers","following_url":"https://api.github.com/users/leolara/following{/other_user}","gists_url":"https://api.github.com/users/leolara/gists{/gist_id}","starred_url":"https://api.github.com/users/leolara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leolara/subscriptions","organizations_url":"https://api.github.com/users/leolara/orgs","repos_url":"https://api.github.com/users/leolara/repos","events_url":"https://api.github.com/users/leolara/events{/privacy}","received_events_url":"https://api.github.com/users/leolara/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/leolara/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/leolara/active_merchant","forks_url":"https://api.github.com/repos/leolara/active_merchant/forks","keys_url":"https://api.github.com/repos/leolara/active_merchant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leolara/active_merchant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leolara/active_merchant/teams","hooks_url":"https://api.github.com/repos/leolara/active_merchant/hooks","issue_events_url":"https://api.github.com/repos/leolara/active_merchant/issues/events{/number}","events_url":"https://api.github.com/repos/leolara/active_merchant/events","assignees_url":"https://api.github.com/repos/leolara/active_merchant/assignees{/user}","branches_url":"https://api.github.com/repos/leolara/active_merchant/branches{/branch}","tags_url":"https://api.github.com/repos/leolara/active_merchant/tags","blobs_url":"https://api.github.com/repos/leolara/active_merchant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leolara/active_merchant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leolara/active_merchant/git/refs{/sha}","trees_url":"https://api.github.com/repos/leolara/active_merchant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leolara/active_merchant/statuses/{sha}","languages_url":"https://api.github.com/repos/leolara/active_merchant/languages","stargazers_url":"https://api.github.com/repos/leolara/active_merchant/stargazers","contributors_url":"https://api.github.com/repos/leolara/active_merchant/contributors","subscribers_url":"https://api.github.com/repos/leolara/active_merchant/subscribers","subscription_url":"https://api.github.com/repos/leolara/active_merchant/subscription","commits_url":"https://api.github.com/repos/leolara/active_merchant/commits{/sha}","git_commits_url":"https://api.github.com/repos/leolara/active_merchant/git/commits{/sha}","comments_url":"https://api.github.com/repos/leolara/active_merchant/comments{/number}","issue_comment_url":"https://api.github.com/repos/leolara/active_merchant/issues/comments{/number}","contents_url":"https://api.github.com/repos/leolara/active_merchant/contents/{+path}","compare_url":"https://api.github.com/repos/leolara/active_merchant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leolara/active_merchant/merges","archive_url":"https://api.github.com/repos/leolara/active_merchant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leolara/active_merchant/downloads","issues_url":"https://api.github.com/repos/leolara/active_merchant/issues{/number}","pulls_url":"https://api.github.com/repos/leolara/active_merchant/pulls{/number}","milestones_url":"https://api.github.com/repos/leolara/active_merchant/milestones{/number}","notifications_url":"https://api.github.com/repos/leolara/active_merchant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leolara/active_merchant/labels{/name}","releases_url":"https://api.github.com/repos/leolara/active_merchant/releases{/id}","created_at":"2014-09-21T11:40:28Z","updated_at":"2014-09-21T02:10:47Z","pushed_at":"2015-03-09T15:59:08Z","git_url":"git://github.com/leolara/active_merchant.git","ssh_url":"git@github.com:leolara/active_merchant.git","clone_url":"https://github.com/leolara/active_merchant.git","svn_url":"https://github.com/leolara/active_merchant","homepage":"http://activemerchant.org","size":12113,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"803f2176549a356b8e28f7010903e055818ba398","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-03-09T20:58:09Z","pushed_at":"2015-03-09T21:23:39Z","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":33847,"stargazers_count":2972,"watchers_count":2972,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1624,"mirror_url":null,"open_issues_count":23,"forks":1624,"open_issues":23,"watchers":2972,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556"},"html":{"href":"https://github.com/Shopify/active_merchant/pull/1556"},"issue":{"href":"https://api.github.com/repos/Shopify/active_merchant/issues/1556"},"comments":{"href":"https://api.github.com/repos/Shopify/active_merchant/issues/1556/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/active_merchant/pulls/1556/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/1556/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/active_merchant/statuses/4482bfd9cd3930c35d1d8b579c26bc37c8c1adf2"}}}}