This is a simple mock payment processing app I created. It takes POST requests to add payments and returns a URL where that payment can be paid in the response. The data storage mechanism is a simple JSON flatfile.
- Install Python 3 on your system
- Clone this repository
- In the root of the repository, run the following commands:
- Create a virtual environment
python3 -m venv venv
- Activate the virtual environment
source venv/bin/activate
- Install the required packages
pip install -r requirements.txt
- Run the application
python3 main.py
- Create a virtual environment
- Send your POST request to
localhost:5000/invoices
- Navigate to the URL in the response
- Enter a payment amount and hit the "Make Payment" button
- Once the you have paid the full amount (or more than the full amount), you will see the "Payment Complete" page
- To reset the stored data, overwrite the
data/invoice_data.json
with{"invoices": {}}