lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.114.0 vs lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.116.0
- old
+ new
@@ -81,65 +81,65 @@
status: 'query',
refund: 'refund',
store: 'registerAccount'
}
- def initialize(options={})
+ def initialize(options = {})
@options = options
@options[:merchant] ||= 'TEST' if test?
requires!(options, :username, :password, :merchant, :pem)
@options[:eci] ||= 'SSL'
end
- def authorize(amount, payment_method, options={})
+ def authorize(amount, payment_method, options = {})
requires!(options, :order_id)
post = {}
add_payment_method(post, payment_method)
add_order(post, amount, options)
commit(:authorize, post)
end
- def capture(amount, authorization, options={})
+ def capture(amount, authorization, options = {})
requires!(options, :order_id)
post = {}
add_reference(post, authorization)
add_order(post, amount, options)
commit(:capture, post)
end
- def purchase(amount, payment_method, options={})
+ def purchase(amount, payment_method, options = {})
requires!(options, :order_id)
post = {}
add_payment_method(post, payment_method)
add_order(post, amount, options)
commit(:purchase, post)
end
- def refund(amount, authorization, options={})
+ def refund(amount, authorization, options = {})
requires!(options, :order_id)
post = {}
add_reference(post, authorization)
add_order(post, amount, options)
commit(:refund, post)
end
- def store(credit_card, options={})
+ def store(credit_card, options = {})
requires!(options, :billing_id)
post = {}
add_payment_method(post, credit_card)
add_payment_method(post, options[:billing_id])
commit(:store, post)
end
- def status(options={})
+ def status(options = {})
requires!(options, :order_id)
commit(:status, 'customer.orderNumber' => options[:order_id])
end
@@ -192,11 +192,10 @@
success = (params[:summary_code] ? (params[:summary_code] == '0') : (params[:response_code] == '00'))
Response.new(success, message, params,
test: (@options[:merchant].to_s == 'TEST'),
- authorization: post[:order_number]
- )
+ authorization: post[:order_number])
rescue ActiveMerchant::ResponseError => e
raise unless e.response.code == '403'
return Response.new(false, 'Invalid credentials', {}, test: test?)
rescue ActiveMerchant::ClientCertificateError