From 70eb25f17a15829df70f1ca38d60bffb2bdd8951 Mon Sep 17 00:00:00 2001 From: Scott Werner Date: Fri, 24 Jan 2025 14:50:44 -0500 Subject: [PATCH] Fix usage of id param in retrieve_customer --- .../nocheckout/stripe/checkout_sessions_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/nocheckout/stripe/checkout_sessions_controller.rb b/app/controllers/nocheckout/stripe/checkout_sessions_controller.rb index 28a4a70..a28cafe 100644 --- a/app/controllers/nocheckout/stripe/checkout_sessions_controller.rb +++ b/app/controllers/nocheckout/stripe/checkout_sessions_controller.rb @@ -71,10 +71,10 @@ def concat_unescaped_stripe_checkout_session_id(url) # Retrives a customer from Stripe and returns a nil if the customer does not exist (instead) # of raising an exception, because this is not exceptional). def retrieve_customer(id:) - return nil if customer_id.blank? + return nil if id.blank? begin - Stripe::Customer.retrieve(String(customer_id)) + Stripe::Customer.retrieve(String(id)) # Blurg ... wish Stripe just returned a response object that's not an exception. rescue Stripe::InvalidRequestError => e case e.response.data