lib/active_merchant/billing/gateways/adyen.rb in activemerchant-1.117.0 vs lib/active_merchant/billing/gateways/adyen.rb in activemerchant-1.118.0
- old
+ new
@@ -225,19 +225,19 @@
post[:shopperStatement] = options[:shopper_statement] if options[:shopper_statement]
post[:additionalData][:updateShopperStatement] = options[:update_shopper_statement] if options[:update_shopper_statement]
end
def add_merchant_data(post, options)
- post[:additionalData][:subMerchantId] = options[:sub_merchant_id] if options[:sub_merchant_id]
+ post[:additionalData][:subMerchantID] = options[:sub_merchant_id] if options[:sub_merchant_id]
post[:additionalData][:subMerchantName] = options[:sub_merchant_name] if options[:sub_merchant_name]
post[:additionalData][:subMerchantStreet] = options[:sub_merchant_street] if options[:sub_merchant_street]
post[:additionalData][:subMerchantCity] = options[:sub_merchant_city] if options[:sub_merchant_city]
post[:additionalData][:subMerchantState] = options[:sub_merchant_state] if options[:sub_merchant_state]
post[:additionalData][:subMerchantPostalCode] = options[:sub_merchant_postal_code] if options[:sub_merchant_postal_code]
post[:additionalData][:subMerchantCountry] = options[:sub_merchant_country] if options[:sub_merchant_country]
post[:additionalData][:subMerchantTaxId] = options[:sub_merchant_tax_id] if options[:sub_merchant_tax_id]
- post[:additionalData][:subMerchantId] = options[:sub_merchant_id] if options[:sub_merchant_id]
post[:additionalData][:subMerchantMCC] = options[:sub_merchant_mcc] if options[:sub_merchant_mcc]
+ post[:additionalData] = post[:additionalData].merge(options[:sub_merchant_data]) if options[:sub_merchant_data]
end
def add_risk_data(post, options)
if (risk_data = options[:risk_data])
risk_data = Hash[risk_data.map { |k, v| ["riskdata.#{k}", v] }]