Skip to content

Instantly share code, notes, and snippets.

@hexatridecimal
Created October 12, 2011 17:11
Show Gist options
  • Save hexatridecimal/1281851 to your computer and use it in GitHub Desktop.
Save hexatridecimal/1281851 to your computer and use it in GitHub Desktop.
Internet Secure gateway code for active_merchant
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class InternetSecureGateway < AuthorizeNetGateway
self.live_url = self.test_url = 'https://anet.internetsecure.com/process.cgi'
self.homepage_url = 'http://www.internetsecure.com/'
self.display_name = 'InternetSecure'
def test?
Base.gateway_mode == :test
end
private
def split(response)
response.split(',')
end
end
end
@jasonmclaren
Copy link

Thanks for posting this snippet! I'm curious, was this actually enough to get Elanon's InternetSecure gateway working with ActiveMerchant?

Also, did you ever look at integrating InternetSecure's support for storing recurring billing info on the merchant's server? (This allows the merchant to initiate each payment, similar to Authorize.net's CIM.)

Cheers.

@hexatridecimal
Copy link
Author

Yep,

Tested using AuthorizeNet's sandbox with something like this:

def new_gateway
  kind = Rails.env.production? ? 'InternetSecure' : 'AuthorizeNet'
  ang  = "ActiveMerchant::Billing::#{kind}Gateway".constantize

  ang.new :login    => APP.gateway.login_id,
    :password => APP.gateway.transaction_key
 end

Their sandbox is really nice for testing. The code is being used in production on a high profile site. Not sure about IS's recurring billing though. My guess is you would need to use their proprietary API for that, their AuthorizeNet gateway is very very sparse with what it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment