lib/active_merchant/billing/gateways/adyen.rb in activemerchant-1.111.0 vs lib/active_merchant/billing/gateways/adyen.rb in activemerchant-1.112.0
- old
+ new
@@ -212,18 +212,23 @@
post[:additionalData][:RequestedTestAcquirerResponseCode] = options[:requested_test_acquirer_response_code] if options[:requested_test_acquirer_response_code] && test?
post[:deviceFingerprint] = options[:device_fingerprint] if options[:device_fingerprint]
add_shopper_data(post, options)
add_risk_data(post, options)
add_shopper_reference(post, options)
+ add_merchant_data(post, options)
end
def add_shopper_data(post, options)
post[:shopperEmail] = options[:email] if options[:email]
post[:shopperEmail] = options[:shopper_email] if options[:shopper_email]
post[:shopperIP] = options[:ip] if options[:ip]
post[:shopperIP] = options[:shopper_ip] if options[:shopper_ip]
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]
end
def add_risk_data(post, options)
if (risk_data = options[:risk_data])
risk_data = Hash[risk_data.map { |k, v| ["riskdata.#{k}", v] }]