lib/active_merchant/billing/gateways/realex.rb in activemerchant-1.105.0 vs lib/active_merchant/billing/gateways/realex.rb in activemerchant-1.106.0
- old
+ new
@@ -105,12 +105,12 @@
Response.new(
(response[:result] == '00'),
message_from(response),
response,
- :test => (response[:message] =~ %r{\[ test system \]}),
- :authorization => authorization_from(response),
+ test: (response[:message] =~ %r{\[ test system \]}),
+ authorization: authorization_from(response),
avs_result: AVSResult.new(code: response[:avspostcoderesponse]),
cvv_result: CVVResult.new(response[:cvnresult])
)
end
@@ -136,11 +136,11 @@
[parsed[:orderid], parsed[:pasref], parsed[:authcode]].join(';')
end
def build_purchase_or_authorization_request(action, money, credit_card, options)
timestamp = new_timestamp
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'auth' do
add_merchant_details(xml, options)
xml.tag! 'orderid', sanitize_order_id(options[:order_id])
add_amount(xml, money, options)
add_card(xml, credit_card)
@@ -157,11 +157,11 @@
xml.target!
end
def build_capture_request(money, authorization, options)
timestamp = new_timestamp
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'settle' do
add_merchant_details(xml, options)
add_amount(xml, money, options)
add_transaction_identifiers(xml, authorization, options)
add_comments(xml, options)
@@ -170,11 +170,11 @@
xml.target!
end
def build_refund_request(money, authorization, options)
timestamp = new_timestamp
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'rebate' do
add_merchant_details(xml, options)
add_transaction_identifiers(xml, authorization, options)
xml.tag! 'amount', amount(money), 'currency' => options[:currency] || currency(money)
xml.tag! 'refundhash', @options[:refund_hash] if @options[:refund_hash]
@@ -185,11 +185,11 @@
xml.target!
end
def build_credit_request(money, credit_card, options)
timestamp = new_timestamp
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'credit' do
add_merchant_details(xml, options)
xml.tag! 'orderid', sanitize_order_id(options[:order_id])
add_amount(xml, money, options)
add_card(xml, credit_card)
@@ -201,11 +201,11 @@
xml.target!
end
def build_void_request(authorization, options)
timestamp = new_timestamp
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'void' do
add_merchant_details(xml, options)
add_transaction_identifiers(xml, authorization, options)
add_comments(xml, options)
add_signed_digest(xml, timestamp, @options[:login], sanitize_order_id(options[:order_id]), nil, nil, nil)
@@ -214,10 +214,10 @@
end
# Verify initiates an OTB (Open To Buy) request
def build_verify_request(credit_card, options)
timestamp = new_timestamp
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag! 'request', 'timestamp' => timestamp, 'type' => 'otb' do
add_merchant_details(xml, options)
xml.tag! 'orderid', sanitize_order_id(options[:order_id])
add_card(xml, credit_card)
add_comments(xml, options)