lib/active_merchant/billing/gateways/global_transport.rb in activemerchant-1.69.0 vs lib/active_merchant/billing/gateways/global_transport.rb in activemerchant-1.70.0

- old
+ new

@@ -107,10 +107,14 @@ Nokogiri::XML(body).root.xpath('*').each do |node| response[node.name.downcase.to_sym] = node.text end + ext_data = Nokogiri::HTML.parse(response[:extdata]) + response[:approved_amount] = ext_data.xpath("//approvedamount").text + response[:balance_due] = ext_data.xpath("//balancedue").text + response end def commit(action, parameters, options) raw = parse(ssl_post(url, post_data(action, parameters, options))) @@ -138,10 +142,10 @@ def url (test? ? test_url : live_url) end def success_from(response) - (response[:result] == "0") + response[:result] == "0" || response[:result] == "200" end def message_from(response) response[:respmsg] end