~singpolyma/jmp-pay

d949a09b487c8764908abdd3b00c3aa8997108ac — Stephen Paul Weber 3 months ago 8a55d4d
Don't use customer id method before gateway is set up
1 files changed, 1 insertions(+), 1 deletions(-)

M config.ru
M config.ru => config.ru +1 -1
@@ 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 }