lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/sage_pay.rb in activemerchant-1.87.0

- old
+ new

@@ -341,20 +341,20 @@ "#{month}#{year[-2..-1]}" end def commit(action, parameters) - response = parse( ssl_post(url_for(action), post_data(action, parameters)) ) + response = parse(ssl_post(url_for(action), post_data(action, parameters))) Response.new(response['Status'] == APPROVED, message_from(response), response, :test => test?, :authorization => authorization_from(response, parameters, action), :avs_result => { - :street_match => AVS_CODE[ response['AddressResult'] ], - :postal_match => AVS_CODE[ response['PostCodeResult'] ], + :street_match => AVS_CODE[response['AddressResult']], + :postal_match => AVS_CODE[response['PostCodeResult']], }, - :cvv_result => CVV_CODE[ response['CV2Result'] ] + :cvv_result => CVV_CODE[response['CV2Result']] ) end def authorization_from(response, params, action) case action @@ -378,12 +378,12 @@ 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 + 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)