lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.101.0 vs lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.102.0

- old
+ new

@@ -377,24 +377,25 @@ def url_for(action) simulate ? build_simulator_url(action) : build_url(action) end def build_url(action) - endpoint = case action - when :purchase, :authorization then 'vspdirect-register' - when :store then 'directtoken' - else TRANSACTIONS[action].downcase - end + endpoint = + case action + when :purchase, :authorization then 'vspdirect-register' + when :store then 'directtoken' + else TRANSACTIONS[action].downcase + 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" "#{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 + response['Status'] == APPROVED ? 'Success' : (response['StatusDetail'] || 'Unspecified error') # simonr 20080207 can't actually get non-nil blanks, so this is shorter end def post_data(action, parameters = {}) parameters.update( :Vendor => @options[:login],