lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.102.0 vs lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.103.0
- old
+ new
@@ -286,10 +286,11 @@
order_id, request_id, request_token = authorization.split(';')
options[:order_id] = order_id
xml = Builder::XmlMarkup.new :indent => 2
add_purchase_data(xml, money, true, options)
+ add_mdd_fields(xml, options)
add_capture_service(xml, request_id, request_token)
add_business_rules_data(xml, authorization, options)
add_issuer_additional_data(xml, options)
xml.target!
end
@@ -466,10 +467,10 @@
xml.tag! 'postalCode', address[:zip]
xml.tag! 'country', lookup_country_code(address[:country]) unless address[:country].blank?
xml.tag! 'company', address[:company] unless address[:company].blank?
xml.tag! 'companyTaxID', address[:companyTaxID] unless address[:company_tax_id].blank?
xml.tag! 'phoneNumber', address[:phone] unless address[:phone].blank?
- xml.tag! 'email', options[:email] || 'null@cybersource.com'
+ xml.tag! 'email', options[:email].presence || 'null@cybersource.com'
xml.tag! 'ipAddress', options[:ip] unless options[:ip].blank? || shipTo
xml.tag! 'driversLicenseNumber', options[:drivers_license_number] unless options[:drivers_license_number].blank?
xml.tag! 'driversLicenseState', options[:drivers_license_state] unless options[:drivers_license_state].blank?
end
end