This code is hosted here.
To test the main functionality, follow these steps:
- Sign up for an account.
- Search for Kyiv-Dnipro trains on 27.03.2023.
- During payment, input the card number 4242 4242 4242 4242, any expiry date in the future, and any three-digit CVC (Stripe docs for reference).
Note
You will need a publicly accessible URL so that Stripe can send a confirmation of a successful payment.
To host the code yourself, follow these steps:
- Clone the repository and install the dependencies.
git clone https://github.com/konovaliuk/Nakhod_Railroad.git
pip install -r requirements.txt
- Initialize a database. For MySQL, you can use the sample file.
mysql> source init_database.sql
- Install
wkhtmltopdf
sudo apt install -y wkhtmltopdf
- Register a Stripe developer account to get an API and endpoint keys.
- Register a SendGrid developer account to get an API key.
- Rename the file
.env.example
to.env
, replace sample environment variables. - Start the server.
python app.py