lib/active_merchant/billing/gateways/ogone.rb in activemerchant-1.12.0 vs lib/active_merchant/billing/gateways/ogone.rb in activemerchant-1.12.1

- old
+ new

@@ -219,11 +219,11 @@ add_pair post, 'CVC', creditcard.verification_value end def parse(body) xml = REXML::Document.new(body) - xml.root.attributes + convert_attributes_to_hash(xml.root.attributes) end def commit(action, parameters) add_pair parameters, 'PSPID', @options[:login] add_pair parameters, 'USERID', @options[:user] @@ -272,8 +272,15 @@ def add_pair(post, key, value, options = {}) post[key] = value if !value.blank? || options[:required] end + def convert_attributes_to_hash(rexml_attributes) + response_hash = {} + rexml_attributes.each do |key, value| + response_hash[key] = value + end + response_hash + end end end end \ No newline at end of file