lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.100.0 vs lib/active_merchant/billing/gateways/wirecard.rb in activemerchant-1.101.0

- old
+ new

@@ -288,13 +288,11 @@ xml.tag! 'Address1', address[:address1] xml.tag! 'Address2', address[:address2] if address[:address2] xml.tag! 'City', address[:city] xml.tag! 'ZipCode', address[:zip] - if address[:state] =~ /[A-Za-z]{2}/ && address[:country] =~ /^(us|ca)$/i - xml.tag! 'State', address[:state].upcase - end + xml.tag! 'State', address[:state].upcase if address[:state] =~ /[A-Za-z]{2}/ && address[:country] =~ /^(us|ca)$/i xml.tag! 'Country', address[:country] xml.tag! 'Phone', address[:phone] if address[:phone] =~ VALID_PHONE_FORMAT xml.tag! 'Email', address[:email] end @@ -329,12 +327,10 @@ # Parse the <ProcessingStatus> Element which contains all important information def parse_response(response, root) status = nil root.elements.to_a.each do |node| - if node.name =~ /FNC_CC_/ - status = REXML::XPath.first(node, 'CC_TRANSACTION/PROCESSING_STATUS') - end + status = REXML::XPath.first(node, 'CC_TRANSACTION/PROCESSING_STATUS') if node.name =~ /FNC_CC_/ end message = '' if status if info = status.elements['Info']