Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import time
|
|
9 |
stripe.api_key = os.environ["STRIPE_API_KEY"]
|
10 |
|
11 |
# Set the product id.
|
12 |
-
|
13 |
|
14 |
# Function to create a Stripe Checkout Session
|
15 |
def create_checkout_session():
|
@@ -17,7 +17,7 @@ def create_checkout_session():
|
|
17 |
session = stripe.checkout.Session.create(
|
18 |
payment_method_types=['card'],
|
19 |
line_items=[{
|
20 |
-
'price':
|
21 |
'quantity': 1,
|
22 |
}],
|
23 |
mode='payment',
|
|
|
9 |
stripe.api_key = os.environ["STRIPE_API_KEY"]
|
10 |
|
11 |
# Set the product id.
|
12 |
+
stripe_price_id = os.environ["STRIPE_PRICE_ID"]
|
13 |
|
14 |
# Function to create a Stripe Checkout Session
|
15 |
def create_checkout_session():
|
|
|
17 |
session = stripe.checkout.Session.create(
|
18 |
payment_method_types=['card'],
|
19 |
line_items=[{
|
20 |
+
'price': stripe_price_id, # Replace with your actual Stripe price ID
|
21 |
'quantity': 1,
|
22 |
}],
|
23 |
mode='payment',
|