diff --git a/config.ru b/config.ru index 2fdb5e25c15fd44f621d1cc098eed14979d52641..7e6b90595d0418389f718431e0efec89297483d3 100644 --- a/config.ru +++ b/config.ru @@ -134,10 +134,18 @@ class CreditCardGateway end end + def payment_method_create_options + options = { verify_card: true, make_default: true } + if merchant_account + options[:verification_merchant_account_id] = merchant_account.to_s + end + options + end + def default_method(nonce) result = antifraud || @gateway.payment_method.create( customer_id: customer_id, payment_method_nonce: nonce, - options: { verify_card: true, make_default: true } + options: payment_method_create_options ) return result if result.success?