lib/active_merchant/billing/gateways/sallie_mae.rb in jelaniharris-activemerchant-1.24.1 vs lib/active_merchant/billing/gateways/sallie_mae.rb in jelaniharris-activemerchant-1.29.1
- old
+ new
@@ -1,9 +1,9 @@
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class SallieMaeGateway < Gateway
- URL = 'https://trans.salliemae.com/cgi-bin/process.cgi'
+ self.live_url = self.test_url = 'https://trans.salliemae.com/cgi-bin/process.cgi'
# The countries the gateway supports merchants from as 2 digit ISO country codes
self.supported_countries = ['US']
# The card types supported by the payment gateway
@@ -15,14 +15,13 @@
# The name of the gateway
self.display_name = 'Sallie Mae'
def initialize(options = {})
requires!(options, :login)
- @options = options
super
end
-
+
def test?
@options[:login] == "TEST0"
end
def authorize(money, creditcard, options = {})
@@ -118,10 +117,10 @@
parameters[:authonly] = 1
when :capture
parameters[:action] = "ns_quicksale_cc"
end
- response = parse(ssl_post(URL, parameters.to_post_data) || "")
+ response = parse(ssl_post(self.live_url, parameters.to_post_data) || "")
Response.new(successful?(response), message_from(response), response,
:test => test?,
:authorization => response["refcode"]
)
end