From d949a09b487c8764908abdd3b00c3aa8997108ac Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 17 Jun 2024 09:33:43 -0500 Subject: [PATCH] Don't use customer id method before gateway is set up --- config.ru | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.ru b/config.ru index c1d0e93..209997d 100644 --- a/config.ru +++ b/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 } -- 2.45.2