lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.79.2 vs lib/active_merchant/billing/gateways/payex.rb in activemerchant-1.80.0
- old
+ new
@@ -1,6 +1,6 @@
-require "nokogiri"
+require 'nokogiri'
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class PayexGateway < Gateway
class_attribute :live_external_url, :test_external_url, :live_confined_url, :test_confined_url
@@ -14,11 +14,11 @@
self.money_format = :cents
self.supported_countries = ['DK', 'FI', 'NO', 'SE']
self.supported_cardtypes = [:visa, :master, :american_express, :discover]
self.homepage_url = 'http://payex.com/'
self.display_name = 'Payex'
- self.default_currency = "EUR"
+ self.default_currency = 'EUR'
TRANSACTION_STATUS = {
sale: '0',
initialize: '1',
credit: '2',
@@ -358,14 +358,14 @@
def parse(xml)
response = {}
xmldoc = Nokogiri::XML(xml)
- body = xmldoc.xpath("//soap:Body/*[1]")[0].inner_text
+ 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}"