From e275d7b124cbd179c43c58f241d229d6fef212ee Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 4 Jan 2023 16:36:11 -0500 Subject: [PATCH] Commit hotfix --- config.ru | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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?