Spaces:
Running
Running
Reduce result verbose
Browse files- fireWhale.py +0 -2
- funciones.py +0 -0
- main.py +17 -22
fireWhale.py
CHANGED
@@ -43,10 +43,8 @@ def obtenDatosUIDFirebase(uid):
|
|
43 |
def obtenDato(coleccion, dato, info):
|
44 |
|
45 |
print(f"Estoy dentro de obtenDato y los valores que recibí son: {coleccion}, {dato}, {info}...")
|
46 |
-
#Primero debemos definir la referencia al documento, o sea a la hoja de usuario.
|
47 |
doc_ref = db.collection(coleccion).document(dato)
|
48 |
|
49 |
-
#Éste es el documento que tiene los datos de ella.
|
50 |
documento = doc_ref.get()
|
51 |
print("Esto es el documento obtenido: ", documento)
|
52 |
|
|
|
43 |
def obtenDato(coleccion, dato, info):
|
44 |
|
45 |
print(f"Estoy dentro de obtenDato y los valores que recibí son: {coleccion}, {dato}, {info}...")
|
|
|
46 |
doc_ref = db.collection(coleccion).document(dato)
|
47 |
|
|
|
48 |
documento = doc_ref.get()
|
49 |
print("Esto es el documento obtenido: ", documento)
|
50 |
|
funciones.py
ADDED
File without changes
|
main.py
CHANGED
@@ -21,8 +21,6 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
21 |
webhook_secret = globales.webhook
|
22 |
|
23 |
data = await request.body()
|
24 |
-
print("data ready")
|
25 |
-
#print(data)
|
26 |
|
27 |
print("Construyendo el evento:")
|
28 |
|
@@ -34,8 +32,7 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
34 |
)
|
35 |
# print("Evento construido...")
|
36 |
# print(event)
|
37 |
-
# print("Evento impreso")
|
38 |
-
# time.sleep(30)
|
39 |
|
40 |
except Exception as e:
|
41 |
print("Excepción es: ", e)
|
@@ -49,24 +46,23 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
49 |
print("Voy a imprimir el event type:")
|
50 |
print(event_type)
|
51 |
|
52 |
-
if event_type == 'payment_intent.succeeded':
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
|
66 |
if event_type == 'checkout.session.completed':
|
67 |
print('CHECKOUT182')
|
68 |
-
print(event_data)
|
69 |
-
print("Ready")
|
70 |
print("Payment Status:")
|
71 |
print(event_data['payment_status'])
|
72 |
print("Nombre Cliente:")
|
@@ -77,9 +73,8 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
77 |
print("Metadata Cusid:")
|
78 |
print(cus_id)
|
79 |
imagenes = event_data['metadata']['imagenes']
|
80 |
-
print("
|
81 |
-
print(imagenes)
|
82 |
-
print("El tipo de dato de imagenes es: ", type(imagenes))
|
83 |
cus = event_data['customer']
|
84 |
print("Customer directo:")
|
85 |
print(cus)
|
|
|
21 |
webhook_secret = globales.webhook
|
22 |
|
23 |
data = await request.body()
|
|
|
|
|
24 |
|
25 |
print("Construyendo el evento:")
|
26 |
|
|
|
32 |
)
|
33 |
# print("Evento construido...")
|
34 |
# print(event)
|
35 |
+
# print("Evento impreso")
|
|
|
36 |
|
37 |
except Exception as e:
|
38 |
print("Excepción es: ", e)
|
|
|
46 |
print("Voy a imprimir el event type:")
|
47 |
print(event_type)
|
48 |
|
49 |
+
# if event_type == 'payment_intent.succeeded':
|
50 |
+
# print('PAYMENT182')
|
51 |
+
# print(event_data)
|
52 |
+
# print("Ready")
|
53 |
+
# print("Created:")
|
54 |
+
# print(event_data['created'])
|
55 |
+
# print("Id")
|
56 |
+
# print(event_data['id'])
|
57 |
+
# print("Payment_method:")
|
58 |
+
# print(event_data['payment_method'])
|
59 |
+
# print("Customer:")
|
60 |
+
# cus = event_data['customer']
|
61 |
+
# print(cus)
|
62 |
|
63 |
if event_type == 'checkout.session.completed':
|
64 |
print('CHECKOUT182')
|
65 |
+
#print(event_data)
|
|
|
66 |
print("Payment Status:")
|
67 |
print(event_data['payment_status'])
|
68 |
print("Nombre Cliente:")
|
|
|
73 |
print("Metadata Cusid:")
|
74 |
print(cus_id)
|
75 |
imagenes = event_data['metadata']['imagenes']
|
76 |
+
print("Imágenes:")
|
77 |
+
print(imagenes)
|
|
|
78 |
cus = event_data['customer']
|
79 |
print("Customer directo:")
|
80 |
print(cus)
|