From b4fbb789485223e1653700a4eb771cdaf252c0f8 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Wed, 13 Apr 2022 12:47:39 -0500 Subject: [PATCH] Work even with no plan --- config.ru | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.ru b/config.ru index feba605..968f065 100644 --- a/config.ru +++ b/config.ru @@ -99,7 +99,10 @@ class CreditCardGateway end def merchant_account - BRAINTREE_CONFIG[:merchant_accounts][customer_plan[:currency]] + plan = customer_plan + return unless plan + + BRAINTREE_CONFIG[:merchant_accounts][plan[:currency]] end def client_token -- 2.34.5