Skip to content

georgeos/payment-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Payment system

Description

Payment system integrated with Openpay (https://www.openpay.mx/) to handle purchases for different products. Each product can have different plans and each plan can have multiple addons.

Every product can be configured according to different requirements, in this case, following products were created:

  • Product A: a subscription product, as when the customer purchases this product, the features are enabled and the customer can use them without any limitation until plan has expired. For example, this could be a product similar to Spotify/Netflix, when you purchase a certain plan, you are able to use all the features until the plan is expired. Anyway, you can upgrade at anytime.
  • Product B: a refill product, as every time a purchase is performed, the customer buy the same bag of utilities. This can be integrated with external systems to refill the capabilities for the customer. For example, if Product B is based on hours, the customer can buy 100 hours of your services every time.

Features

  • Handle different products
  • Handle different plans for products
  • Handle different addons for plans
  • Hierarchy: Product > Plan > Addon
  • Openpay integration
    • Store payments
    • Bank payments
  • Manual purchase registration: e.g. if the user purchases using cash, then this payment can be registered manually in the system.

Tools used

  • Python
  • Django
  • Django rest framework

Installation

cd app
python3 manage.py migrate

Configuration

Openpay

  1. Open app/paymentsystem/settings.py
  2. Go to line 128
  3. Update OPENPAY_MERCHANT and OPENPAY_KEY with your values

To debug in vscode

{
    "name": "paymentsystem",
    "type": "python",
    "request": "launch",
    "console": "integratedTerminal",
    "program": "/path/to/gunicorn",
    "gevent": true,
    "args": [
        "--chdir=app",
        "paymentsystem.wsgi",
        "--bind=0.0.0.0:5000",
        "--timeout=300",
        "-k gevent",
        "--reload"
    ],
}

To run it normally

gunicorn --chdir=app --bind 0.0.0.0:5000 --timeout=300 -k gevent paymentsystem.wsgi --reload

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages