Spaces:
Sleeping
Sleeping
Pagos cachados con exactitud no via cierre de sesión
Browse files
main.py
CHANGED
|
@@ -51,7 +51,9 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
| 51 |
time.sleep(18)
|
| 52 |
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
| 55 |
# print('PAYMENT182')
|
| 56 |
# print(event_data)
|
| 57 |
# print("Ready")
|
|
@@ -65,25 +67,25 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
| 65 |
# cus = event_data['customer']
|
| 66 |
# print(cus)
|
| 67 |
|
| 68 |
-
if event_type == 'checkout.session.completed':
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
|
| 88 |
else:
|
| 89 |
print(f'unhandled event: {event_type}')
|
|
|
|
| 51 |
time.sleep(18)
|
| 52 |
|
| 53 |
|
| 54 |
+
if event_type == 'payment_intent.succeeded':
|
| 55 |
+
print("PAGO CON TARJETA SE PAGO...")
|
| 56 |
+
time.sleep(80)
|
| 57 |
# print('PAYMENT182')
|
| 58 |
# print(event_data)
|
| 59 |
# print("Ready")
|
|
|
|
| 67 |
# cus = event_data['customer']
|
| 68 |
# print(cus)
|
| 69 |
|
| 70 |
+
# if event_type == 'checkout.session.completed':
|
| 71 |
+
# print('CHECKOUT182')
|
| 72 |
+
# #print(event_data)
|
| 73 |
+
# print("Payment Status:")
|
| 74 |
+
# print(event_data['payment_status'])
|
| 75 |
+
# print("Nombre Cliente:")
|
| 76 |
+
# print(event_data['customer_details']['name'])
|
| 77 |
+
# print("Metadata:")
|
| 78 |
+
# print(event_data['metadata'])
|
| 79 |
+
# cus_id = event_data['metadata']['stripe_customer_id']
|
| 80 |
+
# print("Metadata Cusid:")
|
| 81 |
+
# print(cus_id)
|
| 82 |
+
# imagenes = event_data['metadata']['imagenes']
|
| 83 |
+
# print("Imágenes:")
|
| 84 |
+
# print(imagenes)
|
| 85 |
+
# cus = event_data['customer']
|
| 86 |
+
# print("Customer directo:")
|
| 87 |
+
# print(cus)
|
| 88 |
+
# herramientas.registrar_evento(cus_id, int(imagenes))
|
| 89 |
|
| 90 |
else:
|
| 91 |
print(f'unhandled event: {event_type}')
|