lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.16.0 vs lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.17.0
- old
+ new
@@ -5,12 +5,10 @@
#
# The login and password are not the username and password you use to
# login to the Iridium Merchant Management System. Instead, you will
# use the API username and password you were issued separately.
class IridiumGateway < Gateway
- TEST_URL = 'https://gw1.iridiumcorp.net/'
- LIVE_URL = 'https://gw1.iridiumcorp.net/'
# The countries the gateway supports merchants from as 2 digit ISO country codes
self.supported_countries = ['GB', 'ES']
self.default_currency = 'EUR'
self.money_format = :cents
@@ -35,10 +33,12 @@
}
def initialize(options = {})
requires!(options, :login, :password)
@options = options
+ @test_url = 'https://gw1.iridiumcorp.net/'
+ @live_url = 'https://gw1.iridiumcorp.net/'
super
end
def authorize(money, creditcard, options = {})
commit(build_purchase_request('PREAUTH', money, creditcard, options), options)
@@ -170,10 +170,10 @@
xml.tag! 'MerchantAuthentication', {"MerchantID" => @options[:login], "Password" => @options[:password]}
end
def commit(request, options)
requires!(options, :action)
- response = parse(ssl_post(test? ? TEST_URL : LIVE_URL, request,
+ response = parse(ssl_post(test? ? @test_url : @live_url, request,
{"SOAPAction" => "https://www.thepaymentgateway.net/#{options[:action]}",
"Content-Type" => "text/xml; charset=utf-8" }))
success = response[:transaction_result][:status_code] == "0"
message = response[:transaction_result][:message]
\ No newline at end of file