Update routes/subscription.py
Browse files- routes/subscription.py +7 -0
routes/subscription.py
CHANGED
@@ -176,6 +176,10 @@ def create_checkout_session(
|
|
176 |
)
|
177 |
|
178 |
user_data = response_user.json()
|
|
|
|
|
|
|
|
|
179 |
if not user_data:
|
180 |
raise HTTPException(status_code=404, detail="User not found")
|
181 |
|
@@ -183,6 +187,9 @@ def create_checkout_session(
|
|
183 |
user_stripe_id = user.get("stripe_id")
|
184 |
price_id = user.get("price_id")
|
185 |
|
|
|
|
|
|
|
186 |
if not user_stripe_id:
|
187 |
raise HTTPException(status_code=400, detail="User does not have a Stripe ID")
|
188 |
if not price_id:
|
|
|
176 |
)
|
177 |
|
178 |
user_data = response_user.json()
|
179 |
+
|
180 |
+
# Depuração: Verificando o que foi retornado
|
181 |
+
logger.info(f"📌 User Data from Supabase: {user_data}")
|
182 |
+
|
183 |
if not user_data:
|
184 |
raise HTTPException(status_code=404, detail="User not found")
|
185 |
|
|
|
187 |
user_stripe_id = user.get("stripe_id")
|
188 |
price_id = user.get("price_id")
|
189 |
|
190 |
+
# Depuração: Verificando o price_id
|
191 |
+
logger.info(f"📌 Retrieved price_id: {price_id}")
|
192 |
+
|
193 |
if not user_stripe_id:
|
194 |
raise HTTPException(status_code=400, detail="User does not have a Stripe ID")
|
195 |
if not price_id:
|