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

- old
+ new

@@ -62,16 +62,17 @@ # # This should be enough to get you started with eWay and active_merchant. For further information, review the methods # below and the rest of active_merchant's documentation. class EwayGateway < Gateway - TEST_URL = 'https://www.eway.com.au/gateway/xmltest/testpage.asp' - LIVE_URL = 'https://www.eway.com.au/gateway/xmlpayment.asp' + self.test_url = 'https://www.eway.com.au/gateway/xmltest/testpage.asp' + self.live_url = 'https://www.eway.com.au/gateway/xmlpayment.asp' + + class_attribute :test_cvn_url, :live_cvn_url + self.test_cvn_url = 'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp' + self.live_cvn_url = 'https://www.eway.com.au/gateway_cvn/xmlpayment.asp' - TEST_CVN_URL = 'https://www.eway.com.au/gateway_cvn/xmltest/testpage.asp' - LIVE_CVN_URL = 'https://www.eway.com.au/gateway_cvn/xmlpayment.asp' - MESSAGES = { "00" => "Transaction Approved", "01" => "Refer to Issuer", "02" => "Refer to Issuer, special", "03" => "No Merchant", @@ -273,12 +274,12 @@ end end def gateway_url(cvn, test) if cvn - test ? TEST_CVN_URL : LIVE_CVN_URL + test ? self.test_cvn_url : self.live_cvn_url else - test ? TEST_URL : LIVE_URL + test ? self.test_url : self.live_url end end end end