lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.26.0 vs lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.27.0

- old
+ new

@@ -5,11 +5,12 @@ # # 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 - + self.live_url = self.test_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 @@ -33,12 +34,10 @@ } 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,11 +169,11 @@ 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? ? self.test_url : self.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] @@ -253,6 +252,6 @@ def currency_code(currency) CURRENCY_CODES[currency] end end end -end \ No newline at end of file +end