Spaces:
Sleeping
Sleeping
2nd debug
Browse files- autenticacion.py +1 -1
- funciones.py +5 -4
- globales.py +4 -0
autenticacion.py
CHANGED
|
@@ -5,7 +5,7 @@ import time
|
|
| 5 |
|
| 6 |
def defineAmbiente(env):
|
| 7 |
print("Estoy en define ambiente...")
|
| 8 |
-
|
| 9 |
if local_check():
|
| 10 |
print("Entorno Local...")
|
| 11 |
import bridges
|
|
|
|
| 5 |
|
| 6 |
def defineAmbiente(env):
|
| 7 |
print("Estoy en define ambiente...")
|
| 8 |
+
|
| 9 |
if local_check():
|
| 10 |
print("Entorno Local...")
|
| 11 |
import bridges
|
funciones.py
CHANGED
|
@@ -3,9 +3,13 @@ import globales
|
|
| 3 |
import herramientas
|
| 4 |
import ga4Analiticas
|
| 5 |
from fastapi import Request, Header
|
|
|
|
| 6 |
|
| 7 |
async def procesa_evento(request: Request, stripe_signature: str = Header(None)):
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
webhook_secret = globales.webhook
|
| 10 |
data = await request.body()
|
| 11 |
|
|
@@ -14,10 +18,7 @@ async def procesa_evento(request: Request, stripe_signature: str = Header(None))
|
|
| 14 |
payload=data,
|
| 15 |
sig_header=stripe_signature,
|
| 16 |
secret=webhook_secret
|
| 17 |
-
)
|
| 18 |
-
# print("Evento construido...")
|
| 19 |
-
# print(event)
|
| 20 |
-
# print("Evento impreso")
|
| 21 |
|
| 22 |
except Exception as e:
|
| 23 |
print("Excepción es: ", e)
|
|
|
|
| 3 |
import herramientas
|
| 4 |
import ga4Analiticas
|
| 5 |
from fastapi import Request, Header
|
| 6 |
+
import time
|
| 7 |
|
| 8 |
async def procesa_evento(request: Request, stripe_signature: str = Header(None)):
|
| 9 |
|
| 10 |
+
print("Estoy en procesa evento....")
|
| 11 |
+
time.sleep(17)
|
| 12 |
+
|
| 13 |
webhook_secret = globales.webhook
|
| 14 |
data = await request.body()
|
| 15 |
|
|
|
|
| 18 |
payload=data,
|
| 19 |
sig_header=stripe_signature,
|
| 20 |
secret=webhook_secret
|
| 21 |
+
)
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
except Exception as e:
|
| 24 |
print("Excepción es: ", e)
|
globales.py
CHANGED
|
@@ -1,4 +1,8 @@
|
|
| 1 |
import os
|
| 2 |
import autenticacion
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
llave, webhook, ga4Key, ga4ID = autenticacion.defineAmbiente(os.getenv("ambiente"))
|
|
|
|
| 1 |
import os
|
| 2 |
import autenticacion
|
| 3 |
+
import time
|
| 4 |
+
|
| 5 |
+
print("Estoy en globales...")
|
| 6 |
+
time.sleep(17)
|
| 7 |
|
| 8 |
llave, webhook, ga4Key, ga4ID = autenticacion.defineAmbiente(os.getenv("ambiente"))
|