mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 15:12:58 +00:00
Add checkout session creation debugging
This commit is contained in:
parent
bf22a2d21a
commit
90352982bf
@ -28,6 +28,10 @@ class StripePaymentHandler:
|
|||||||
cancel_url = 'https://netcop.up.railway.app/wallet/top-up/cancel/'
|
cancel_url = 'https://netcop.up.railway.app/wallet/top-up/cancel/'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
print(f"🚀 Creating checkout session for user {user.id} ({user.email}), amount: {amount} AED")
|
||||||
|
print(f"📍 Success URL: {success_url}")
|
||||||
|
print(f"📍 Cancel URL: {cancel_url}")
|
||||||
|
|
||||||
session = stripe.checkout.Session.create(
|
session = stripe.checkout.Session.create(
|
||||||
payment_method_types=['card'],
|
payment_method_types=['card'],
|
||||||
line_items=[{
|
line_items=[{
|
||||||
@ -53,6 +57,10 @@ class StripePaymentHandler:
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print(f"✅ Session created: {session.id}")
|
||||||
|
print(f"💳 Client reference ID: {session.client_reference_id}")
|
||||||
|
print(f"🔗 Payment URL: {session.url}")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'payment_url': session.url,
|
'payment_url': session.url,
|
||||||
'session_id': session.id
|
'session_id': session.id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user