lib/active_merchant/billing/gateways/qvalent.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/qvalent.rb in activemerchant-1.116.0
- old
+ new
@@ -14,16 +14,16 @@
CVV_CODE_MAPPING = {
'S' => 'D'
}
- def initialize(options={})
+ def initialize(options = {})
requires!(options, :username, :password, :merchant, :pem, :pem_password)
super
end
- def purchase(amount, payment_method, options={})
+ def purchase(amount, payment_method, options = {})
post = {}
add_invoice(post, amount, options)
add_order_number(post, options)
add_payment_method(post, payment_method)
add_verification_value(post, payment_method)
@@ -32,11 +32,11 @@
add_soft_descriptors(post, options)
commit('capture', post)
end
- def authorize(amount, payment_method, options={})
+ def authorize(amount, payment_method, options = {})
post = {}
add_invoice(post, amount, options)
add_order_number(post, options)
add_payment_method(post, payment_method)
add_verification_value(post, payment_method)
@@ -45,21 +45,21 @@
add_soft_descriptors(post, options)
commit('preauth', post)
end
- def capture(amount, authorization, options={})
+ def capture(amount, authorization, options = {})
post = {}
add_invoice(post, amount, options)
add_reference(post, authorization, options)
add_customer_data(post, options)
add_soft_descriptors(post, options)
commit('captureWithoutAuth', post)
end
- def refund(amount, authorization, options={})
+ def refund(amount, authorization, options = {})
post = {}
add_invoice(post, amount, options)
add_reference(post, authorization, options)
add_customer_data(post, options)
add_soft_descriptors(post, options)
@@ -67,22 +67,22 @@
commit('refund', post)
end
# Credit requires the merchant account to be enabled for "Adhoc Refunds"
- def credit(amount, payment_method, options={})
+ def credit(amount, payment_method, options = {})
post = {}
add_invoice(post, amount, options)
add_order_number(post, options)
add_payment_method(post, payment_method)
add_customer_data(post, options)
add_soft_descriptors(post, options)
commit('refund', post)
end
- def void(authorization, options={})
+ def void(authorization, options = {})
post = {}
add_reference(post, authorization, options)
add_customer_data(post, options)
add_soft_descriptors(post, options)
@@ -108,10 +108,10 @@
gsub(%r((&?card.CVN=)[^&]*), '\1[FILTERED]')
end
private
- CURRENCY_CODES = Hash.new { |h, k| raise ArgumentError.new("Unsupported currency: #{k}") }
+ CURRENCY_CODES = Hash.new { |_h, k| raise ArgumentError.new("Unsupported currency: #{k}") }
CURRENCY_CODES['AUD'] = 'AUD'
CURRENCY_CODES['INR'] = 'INR'
def add_soft_descriptors(post, options)
post['customer.merchantName'] = options[:customer_merchant_name] if options[:customer_merchant_name]