lib/active_merchant/billing/gateways/qbms.rb in activemerchant-1.29.3 vs lib/active_merchant/billing/gateways/qbms.rb in activemerchant-1.30.0

- old
+ new

@@ -124,10 +124,11 @@ type = TYPES[action] parameters[:trans_request_id] ||= SecureRandom.hex(10) req = build_request(type, money, parameters) + data = ssl_post(url, req, "Content-Type" => "application/x-qbmsxml") response = parse(type, data) message = (response[:status_message] || '').strip Response.new(success?(response), message, response, @@ -258,11 +259,11 @@ def build_MerchantAccountQuery(xml, money, parameters) end def add_address(xml, parameters) if address = parameters[:billing_address] || parameters[:address] - xml.tag!("CreditCardAddress", address[:address1][0...30]) - xml.tag!("CreditCardPostalCode", address[:zip][0...9]) + xml.tag!("CreditCardAddress", (address[:address1] || "")[0...30]) + xml.tag!("CreditCardPostalCode", (address[:zip] || "")[0...9]) end end def cvv_result(response) case response[:card_security_code_match]