lib/active_merchant/billing/gateways/mastercard.rb in activemerchant-1.61.0 vs lib/active_merchant/billing/gateways/mastercard.rb in activemerchant-1.62.0

- old
+ new

@@ -18,19 +18,21 @@ post = new_post add_invoice(post, amount, options) add_reference(post, *new_authorization) add_payment_method(post, payment_method) add_customer_data(post, payment_method, options) + add_3dsecure_id(post, options) commit('authorize', post) end def capture(amount, authorization, options={}) post = new_post add_invoice(post, amount, options, :transaction) add_reference(post, *next_authorization(authorization)) add_customer_data(post, nil, options) + add_3dsecure_id(post, options) commit('capture', post) end def refund(amount, authorization, options={}) @@ -156,9 +158,14 @@ end post[:billing].merge!(billing) post[:shipping].merge!(shipping) post[:device].merge!(device) post[:customer].merge!(customer) + end + + def add_3dsecure_id(post, options) + return unless options[:threed_secure_id] + post.merge!({"3DSecureId" => options[:threed_secure_id]}) end def country_code(country) if country country = ActiveMerchant::Country.find(country)