Django-Pay is a reusable Django app for managing subscriptions, payment cards, and transactions. Designed for seamless integration and PCI compliance, it supports Realex, PayPal, and Global Payments gateways.
- Payment Gateways: Supports Realex and Global Payments with PayPal fallback.
- Card Validation: MOD10 (Luhn algorithm), expiry checks, and AVS.
- Encrypted Storage: Securely stores card details.
- PCI Compliance: Built-in tools to meet PCI standards.
- Recurring Payments: Easy setup for subscription models.
- Install the Package
pip install -e git+https://github.com/fmalina/django-pay.git#egg=pay
- Add
pay
to yourINSTALLED_APPS
insettings.py
:
INSTALLED_APPS = [
...,
'pay',
]
- Include pay URLs in your project's
urls.py
file:
from django.urls import include, path
urlpatterns = [
...,
path('pay/', include('pay.urls')),
]
- Customize settings as needed (see
pay/app_settings.py
for options). - Apply migrations
./manage.py migrate pay
Add a subscription link to your templates:
<a href="{% url 'subscribe' %}">Subscribe</a>
Set up a cron job using the provided crontab.txt
for automated charges.