lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.108.0 vs lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.109.0
- old
+ new
@@ -67,12 +67,12 @@
recipient_surname: :FIRecipientSurname,
recipient_postcode: :FIRecipientPostcode,
recipient_dob: :FIRecipientDoB
}
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :maestro, :diners_club]
- self.supported_countries = ['GB', 'IE']
+ self.supported_countries = %w[GB IE]
+ self.supported_cardtypes = %i[visa master american_express discover jcb maestro diners_club]
self.default_currency = 'GBP'
self.homepage_url = 'http://www.sagepay.com'
self.display_name = 'SagePay'
@@ -388,10 +388,10 @@
end
"#{test? ? self.test_url : self.live_url}/#{endpoint}.vsp"
end
def build_simulator_url(action)
- endpoint = [:purchase, :authorization].include?(action) ? 'VSPDirectGateway.asp' : "VSPServerGateway.asp?Service=Vendor#{TRANSACTIONS[action].capitalize}Tx"
+ endpoint = %i[purchase authorization].include?(action) ? 'VSPDirectGateway.asp' : "VSPServerGateway.asp?Service=Vendor#{TRANSACTIONS[action].capitalize}Tx"
"#{self.simulator_url}/#{endpoint}"
end
def message_from(response)
response['Status'] == APPROVED ? 'Success' : (response['StatusDetail'] || 'Unspecified error') # simonr 20080207 can't actually get non-nil blanks, so this is shorter