Skip to content

blakemulnix/PythonPaymentProcessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Payment Processor

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.

How to setup and run the application (for unix systems)

  1. Install Python 3 on your system
  2. Clone this repository
  3. In the root of the repository, run the following commands:
    1. Create a virtual environment
      python3 -m venv venv
    2. Activate the virtual environment
      source venv/bin/activate
    3. Install the required packages
      pip install -r requirements.txt
    4. Run the application
      python3 main.py

How to use the application

  • 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": {}}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published