lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/iridium.rb in activemerchant-1.87.0
- old
+ new
@@ -276,20 +276,20 @@
end
private
def build_purchase_request(type, money, creditcard, options)
- options.merge!(:action => 'CardDetailsTransaction')
+ options[:action] = 'CardDetailsTransaction'
build_request(options) do |xml|
add_purchase_data(xml, type, money, options)
add_creditcard(xml, creditcard)
add_customerdetails(xml, creditcard, options[:billing_address], options)
end
end
def build_reference_request(type, money, authorization, options)
- options.merge!(:action => 'CrossReferenceTransaction')
+ options[:action] = 'CrossReferenceTransaction'
order_id, cross_reference, _ = authorization.split(';')
build_request(options) do |xml|
if money
details = {'CurrencyCode' => currency_code(options[:currency] || default_currency), 'Amount' => amount(money)}
else
@@ -417,42 +417,42 @@
def parse_element(reply, node)
case node.name
when 'CrossReferenceTransactionResult'
reply[:transaction_result] = {}
- node.attributes.each do |a,b|
+ node.attributes.each do |a, b|
reply[:transaction_result][a.underscore.to_sym] = b
end
- node.elements.each{|e| parse_element(reply[:transaction_result], e) } if node.has_elements?
+ node.elements.each { |e| parse_element(reply[:transaction_result], e) } if node.has_elements?
when 'CardDetailsTransactionResult'
reply[:transaction_result] = {}
- node.attributes.each do |a,b|
+ node.attributes.each do |a, b|
reply[:transaction_result][a.underscore.to_sym] = b
end
- node.elements.each{|e| parse_element(reply[:transaction_result], e) } if node.has_elements?
+ node.elements.each { |e| parse_element(reply[:transaction_result], e) } if node.has_elements?
when 'TransactionOutputData'
reply[:transaction_output_data] = {}
- node.attributes.each{|a,b| reply[:transaction_output_data][a.underscore.to_sym] = b }
- node.elements.each{|e| parse_element(reply[:transaction_output_data], e) } if node.has_elements?
+ node.attributes.each { |a, b| reply[:transaction_output_data][a.underscore.to_sym] = b }
+ node.elements.each { |e| parse_element(reply[:transaction_output_data], e) } if node.has_elements?
when 'CustomVariables'
reply[:custom_variables] = {}
- node.attributes.each{|a,b| reply[:custom_variables][a.underscore.to_sym] = b }
- node.elements.each{|e| parse_element(reply[:custom_variables], e) } if node.has_elements?
+ node.attributes.each { |a, b| reply[:custom_variables][a.underscore.to_sym] = b }
+ node.elements.each { |e| parse_element(reply[:custom_variables], e) } if node.has_elements?
when 'GatewayEntryPoints'
reply[:gateway_entry_points] = {}
- node.attributes.each{|a,b| reply[:gateway_entry_points][a.underscore.to_sym] = b }
- node.elements.each{|e| parse_element(reply[:gateway_entry_points], e) } if node.has_elements?
+ node.attributes.each { |a, b| reply[:gateway_entry_points][a.underscore.to_sym] = b }
+ node.elements.each { |e| parse_element(reply[:gateway_entry_points], e) } if node.has_elements?
else
k = node.name.underscore.to_sym
if node.has_elements?
reply[k] = {}
- node.elements.each{|e| parse_element(reply[k], e) }
+ node.elements.each { |e| parse_element(reply[k], e) }
else
if node.has_attributes?
reply[k] = {}
- node.attributes.each{|a,b| reply[k][a.underscore.to_sym] = b }
+ node.attributes.each { |a, b| reply[k][a.underscore.to_sym] = b }
else
reply[k] = node.text
end
end
end