Don't use customer id method before gateway is set up

Stephen Paul Weber created

Change summary

config.ru | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

config.ru 🔗

@@ -154,7 +154,7 @@ class CreditCardCustomerGateway
 	end
 
 	def customer_plan
-		name = DB.exec_params(<<~SQL, [customer_id]).first&.[]("plan_name")
+		name = DB.exec_params(<<~SQL, [@customer_id]).first&.[]("plan_name")
 			SELECT plan_name FROM customer_plans WHERE customer_id=$1 LIMIT 1
 		SQL
 		PLANS.find { |plan| plan[:name].to_s == name }