lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.85.0 vs lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.86.0
- old
+ new
@@ -361,20 +361,20 @@
xmldoc = Nokogiri::XML(xml)
body = xmldoc.xpath('//soap:Body/*[1]')[0].inner_text
doc = Nokogiri::XML(body)
- doc.root.xpath('*').each do |node|
+ doc.root&.xpath('*')&.each do |node|
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
end
end
- end unless doc.root.nil?
+ end
response
end
# Commits all requests to the Payex soap endpoint
@@ -406,6 +406,5 @@
response[:status_description]
end
end
end
end
-