lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.87.0
- old
+ new
@@ -61,12 +61,12 @@
requires!(options, :order_id)
amount = amount(amount)
if payment_method.respond_to?(:number)
# credit card authorization
MultiResponse.new.tap do |r|
- r.process {send_initialize(amount, true, options)}
- r.process {send_purchasecc(payment_method, r.params['orderref'])}
+ r.process { send_initialize(amount, true, options) }
+ r.process { send_purchasecc(payment_method, r.params['orderref']) }
end
else
# stored authorization
send_autopay(amount, payment_method, true, options)
end
@@ -89,12 +89,12 @@
requires!(options, :order_id)
amount = amount(amount)
if payment_method.respond_to?(:number)
# credit card purchase
MultiResponse.new.tap do |r|
- r.process {send_initialize(amount, false, options)}
- r.process {send_purchasecc(payment_method, r.params['orderref'])}
+ r.process { send_initialize(amount, false, options) }
+ r.process { send_purchasecc(payment_method, r.params['orderref']) }
end
else
# stored purchase
send_autopay(amount, payment_method, false, options)
end
@@ -152,14 +152,14 @@
# Returns an ActiveMerchant::Billing::Response object where the authorization is set to the agreement_ref which is used for stored payments.
def store(creditcard, options = {})
requires!(options, :order_id)
amount = amount(1) # 1 cent for authorization
MultiResponse.run(:first) do |r|
- r.process {send_create_agreement(options)}
- r.process {send_initialize(amount, true, options.merge({agreement_ref: r.authorization}))}
+ r.process { send_create_agreement(options) }
+ r.process { send_initialize(amount, true, options.merge({agreement_ref: r.authorization})) }
order_ref = r.params['orderref']
- r.process {send_purchasecc(creditcard, order_ref)}
+ r.process { send_purchasecc(creditcard, order_ref) }
end
end
# Public: Unstores a customer's credit card and deletes their Payex agreement.
#
@@ -362,10 +362,10 @@
body = xmldoc.xpath('//soap:Body/*[1]')[0].inner_text
doc = Nokogiri::XML(body)
doc.root&.xpath('*')&.each do |node|
- if (node.elements.size == 0)
+ if node.elements.size == 0
response[node.name.downcase.to_sym] = node.text
else
node.elements.each do |childnode|
name = "#{node.name.downcase}_#{childnode.name.downcase}"
response[name.to_sym] = childnode.text