lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.112.0 vs lib/active_merchant/billing/gateways/cyber_source.rb in activemerchant-1.113.0
- old
+ new
@@ -32,11 +32,11 @@
master: 'spa',
maestro: 'spa',
american_express: 'aesk',
jcb: 'js',
discover: 'pb',
- diners_club: 'pb',
+ diners_club: 'pb'
}.freeze
DEFAULT_COLLECTION_INDICATOR = 2
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb dankort maestro elo]
self.supported_countries = %w(US AE BR CA CN DK FI FR DE IN JP MX NO SE GB SG LB PK)
@@ -264,10 +264,12 @@
city: 'Unspecified',
state: 'NC',
zip: '00000',
country: 'US'
}
- options[:billing_address] = options[:billing_address] || options[:address] || default_address
+
+ submitted_address = options[:billing_address] || options[:address] || default_address
+ options[:billing_address] = default_address.merge(submitted_address) { |_k, default, submitted| submitted.blank? ? default : submitted }
options[:shipping_address] = options[:shipping_address] || {}
end
def build_auth_request(money, creditcard_or_reference, options)
xml = Builder::XmlMarkup.new indent: 2