Work even with no plan

Stephen Paul Weber created

Change summary

config.ru | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Detailed changes

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