lib/active_merchant/billing/gateways/payscout.rb in activemerchant-1.133.0 vs lib/active_merchant/billing/gateways/payscout.rb in activemerchant-1.137.0
- old
+ new
@@ -113,16 +113,20 @@
response = parse(data)
response[:action] = action
message = message_from(response)
test_mode = (test? || message =~ /TESTMODE/)
- Response.new(success?(response), message, response,
+ Response.new(
+ success?(response),
+ message,
+ response,
test: test_mode,
authorization: response['transactionid'],
fraud_review: fraud_review?(response),
avs_result: { code: response['avsresponse'] },
- cvv_result: response['cvvresponse'])
+ cvv_result: response['cvvresponse']
+ )
end
def message_from(response)
case response['response']
when '1'
@@ -149,11 +153,10 @@
post[:username] = @options[:username]
post[:password] = @options[:password]
post[:type] = action
- request = post.merge(parameters).collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&')
- request
+ post.merge(parameters).collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&')
end
end
end
end