Check out the post.
-
Fork/Clone
-
Create and activate a virtual environment:
$ python3 -m venv venv && source venv/bin/activate
-
Install the requirements:
(venv)$ pip install -r requirements.txt
-
Add your Stripe test secret key, test publishable key, endpoint secret and price API ID as environmental variables:
(venv)$ export STRIPE_PUBLISHABLE_KEY=<YOUR_STRIPE_PUBLISHABLE_KEY> (venv)$ export STRIPE_SECRET_KEY=<YOUR_STRIPE_SECRET_KEY> (venv)$ export STRIPE_PRICE_ID=<YOUR_PRICE_API_ID> (venv)$ export STRIPE_ENDPOINT_SECRET=<YOUR_ENDPOINT_SECRET_KEY>
-
Run the server:
(venv)$ FLASK_ENV=development python app.py
Navigate to http://localhost:5000.