Spaces:
Sleeping
Sleeping
Print key
Browse files
main.py
CHANGED
|
@@ -10,15 +10,15 @@ app = FastAPI()
|
|
| 10 |
#stripe.api_key = os.environ["STRIPE_KEY"]
|
| 11 |
#API_KEY secret.
|
| 12 |
stripe.api_key = os.getenv("STRIPE_KEY")
|
|
|
|
|
|
|
| 13 |
# This is a terrible idea, only used for demo purposes!
|
| 14 |
app.state.stripe_customer_id = None
|
| 15 |
|
| 16 |
@app.get("/")
|
| 17 |
def start():
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
return {"Status":"Deployed"}
|
| 22 |
|
| 23 |
@app.post("/webhook")
|
| 24 |
async def webhook_received(request: Request, stripe_signature: str = Header(None)):
|
|
|
|
| 10 |
#stripe.api_key = os.environ["STRIPE_KEY"]
|
| 11 |
#API_KEY secret.
|
| 12 |
stripe.api_key = os.getenv("STRIPE_KEY")
|
| 13 |
+
|
| 14 |
+
string_key = stripe.api_key
|
| 15 |
# This is a terrible idea, only used for demo purposes!
|
| 16 |
app.state.stripe_customer_id = None
|
| 17 |
|
| 18 |
@app.get("/")
|
| 19 |
def start():
|
| 20 |
|
| 21 |
+
return {f"Status":"Deployed {string_key}",}
|
|
|
|
|
|
|
| 22 |
|
| 23 |
@app.post("/webhook")
|
| 24 |
async def webhook_received(request: Request, stripe_signature: str = Header(None)):
|