lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.105.0 vs lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.106.0
- old
+ new
@@ -178,14 +178,14 @@
success = response[:FunctionResult] == 'ACK' || response[:FunctionResult] == 'PENDING'
message = response[:Message]
authorization = response[:GuWID]
Response.new(success, message, response,
- :test => test?,
- :authorization => authorization,
- :avs_result => { :code => avs_code(response, options) },
- :cvv_result => response[:CVCResponseCode]
+ test: test?,
+ authorization: authorization,
+ avs_result: { code: avs_code(response, options) },
+ cvv_result: response[:CVCResponseCode]
)
rescue ResponseError => e
if e.response.code == '401'
return Response.new(false, 'Invalid Login')
else
@@ -195,11 +195,11 @@
# Generates the complete xml-message, that gets sent to the gateway
def build_request(action, money, options)
options = prepare_options_hash(options)
options[:action] = action
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.instruct!
xml.tag! 'WIRECARD_BXML' do
xml.tag! 'W_REQUEST' do
xml.tag! 'W_JOB' do
xml.tag! 'JobID', ''
@@ -389,10 +389,10 @@
string = ''
errors.each do |error|
string << error[:Message] if error[:Message]
error[:Advice].each_with_index do |advice, index|
string << ' (' if index == 0
- string << "#{index+1}. #{advice}"
+ string << "#{index + 1}. #{advice}"
string << ' and ' if index < error[:Advice].size - 1
string << ')' if index == error[:Advice].size - 1
end
end
string