Spaces:
Sleeping
Sleeping
Remove secrets
Browse files- autenticacion.py +1 -1
- main.py +3 -6
autenticacion.py
CHANGED
|
@@ -11,7 +11,7 @@ def defineAmbiente():
|
|
| 11 |
print("Entorno remoto listo...")
|
| 12 |
llave = os.getenv("STRIPE_KEY") #Acceso a HF
|
| 13 |
webhook = os.getenv("STRIPE_WEBHOOK_SECRET")
|
| 14 |
-
print(f"La llave es {llave} y el webhook es {webhook}.")
|
| 15 |
|
| 16 |
return llave, webhook
|
| 17 |
|
|
|
|
| 11 |
print("Entorno remoto listo...")
|
| 12 |
llave = os.getenv("STRIPE_KEY") #Acceso a HF
|
| 13 |
webhook = os.getenv("STRIPE_WEBHOOK_SECRET")
|
| 14 |
+
#print(f"La llave es {llave} y el webhook es {webhook}.")
|
| 15 |
|
| 16 |
return llave, webhook
|
| 17 |
|
main.py
CHANGED
|
@@ -51,7 +51,7 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
| 51 |
|
| 52 |
if event_type == 'payment_intent.succeeded':
|
| 53 |
print('PAYMENT182')
|
| 54 |
-
|
| 55 |
print("Ready")
|
| 56 |
print("Created:")
|
| 57 |
print(event_data['created'])
|
|
@@ -65,7 +65,7 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
| 65 |
|
| 66 |
if event_type == 'checkout.session.completed':
|
| 67 |
print('CHECKOUT182')
|
| 68 |
-
|
| 69 |
print("Ready")
|
| 70 |
print("Payment Status:")
|
| 71 |
print(event_data['payment_status'])
|
|
@@ -86,7 +86,4 @@ async def webhook_received(request: Request, stripe_signature: str = Header(None
|
|
| 86 |
else:
|
| 87 |
print(f'unhandled event: {event_type}')
|
| 88 |
|
| 89 |
-
return {"status": "success"}
|
| 90 |
-
|
| 91 |
-
# if __name__ == '__main__':
|
| 92 |
-
# uvicorn.run("main:app", reload=True)
|
|
|
|
| 51 |
|
| 52 |
if event_type == 'payment_intent.succeeded':
|
| 53 |
print('PAYMENT182')
|
| 54 |
+
print(event_data)
|
| 55 |
print("Ready")
|
| 56 |
print("Created:")
|
| 57 |
print(event_data['created'])
|
|
|
|
| 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'])
|
|
|
|
| 86 |
else:
|
| 87 |
print(f'unhandled event: {event_type}')
|
| 88 |
|
| 89 |
+
return {"status": "success"}
|
|
|
|
|
|
|
|
|