lib/active_merchant/billing/gateways/optimal_payment.rb in activemerchant-1.105.0 vs lib/active_merchant/billing/gateways/optimal_payment.rb in activemerchant-1.106.0
- old
+ new
@@ -116,14 +116,14 @@
end
txnRequest = escape_uri(xml)
response = parse(ssl_post(test? ? self.test_url : self.live_url, "txnMode=#{action}&txnRequest=#{txnRequest}"))
Response.new(successful?(response), message_from(response), hash_from_xml(response),
- :test => test?,
- :authorization => authorization_from(response),
- :avs_result => { :code => avs_result_from(response) },
- :cvv_result => cvv_result_from(response)
+ test: test?,
+ authorization: authorization_from(response),
+ avs_result: { code: avs_result_from(response) },
+ cvv_result: cvv_result_from(response)
)
end
# The upstream is picky and so we can't use CGI.escape like we want to
def escape_uri(uri)
@@ -171,11 +171,11 @@
end
hsh
end
def xml_document(root_tag)
- xml = Builder::XmlMarkup.new :indent => 2
+ xml = Builder::XmlMarkup.new indent: 2
xml.tag!(root_tag, schema) do
yield xml
end
xml.target!
end
@@ -187,11 +187,11 @@
def cc_auth_request(money, opts)
xml_document('ccAuthRequestV1') do |xml|
build_merchant_account(xml)
xml.merchantRefNum opts[:order_id]
- xml.amount(money/100.0)
+ xml.amount(money / 100.0)
build_card(xml, opts)
build_billing_details(xml, opts)
build_shipping_details(xml, opts)
xml.customerIP opts[:ip] if opts[:ip]
end
@@ -208,20 +208,20 @@
def cc_post_auth_request(money, opts)
xml_document('ccPostAuthRequestV1') do |xml|
build_merchant_account(xml)
xml.confirmationNumber opts[:confirmationNumber]
xml.merchantRefNum opts[:order_id]
- xml.amount(money/100.0)
+ xml.amount(money / 100.0)
end
end
def cc_stored_data_request(money, opts)
xml_document('ccStoredDataRequestV1') do |xml|
build_merchant_account(xml)
xml.merchantRefNum opts[:order_id]
xml.confirmationNumber opts[:confirmationNumber]
- xml.amount(money/100.0)
+ xml.amount(money / 100.0)
end
end
# untested
#
@@ -317,10 +317,10 @@
end
def card_type(key)
{ 'visa' => 'VI',
'master' => 'MC',
- 'american_express'=> 'AM',
+ 'american_express' => 'AM',
'discover' => 'DI',
'diners_club' => 'DC', }[key]
end
end
end