lib/active_merchant/billing/gateways/mundipagg.rb in activemerchant-1.93.0 vs lib/active_merchant/billing/gateways/mundipagg.rb in activemerchant-1.94.0

- old
+ new

@@ -153,10 +153,11 @@ def add_payment(post, payment, options) post[:customer][:name] = payment.name if post[:customer] post[:customer_id] = parse_auth(payment)[0] if payment.is_a?(String) post[:payment] = {} - post[:payment][:gateway_affiliation_id] = @options[:gateway_id] if @options[:gateway_id] + affiliation = options[:gateway_affiliation_id] || @options[:gateway_id] + post[:payment][:gateway_affiliation_id] = affiliation if affiliation post[:payment][:metadata] = { mundipagg_payment_method_code: '1' } if test? if voucher?(payment) add_voucher(post, payment, options) else add_credit_card(post, payment, options)