Multi-broker payment processor for Django
Project description
django-getpaid is a multi-broker payment processor for Django
Documentation
The full documentation is at https://django-getpaid.readthedocs.io.
Quickstart
Install django-getpaid and a payment backend:
pip install django-getpaid
pip install django-getpaid-dotpay
Add them to your INSTALLED_APPS:
INSTALLED_APPS = [
...
'getpaid',
'getpaid_dotpay',
...
]
Add django-getpaid’s URL patterns:
urlpatterns = [
...
url(r'^payments/', include('getpaid.urls')),
...
]
Use getpaid.models.AbstractOrder as parent class of your Order model and define minimal set of methods:
from getpaid.models import AbstractOrder
class MyCustomOrder(AbstractOrder):
# fields
def get_absolute_url(self):
return reverse('order-detail', kwargs=dict(pk=self.pk))
def get_total_amount(self):
return self.amount
def get_user_info(self):
return dict(email=self.buyer.email)
def get_description(self):
return self.description
Select your Order model in settings.py and provide settings for payment backends:
GETPAID_ORDER_MODEL = 'yourapp.MyCustomOrder'
GETPAID_BACKEND_SETTINGS = {
'getpaid_dotpay': { # dotted import path of the plugin
# refer to backend docs for its real settings
'merchant_id': 123456789,
'key2': abcdef123456789,
},
}
Features
support for multiple payment brokers at the same time
clean but flexible architecture
support for asynchronous status updates - both push and pull
support for using multiple currencies (but one per payment)
easy customization with provided base abstract models and swappable mechanic (same as with Django’s User model)
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox -p all
Disclaimer
This project has nothing in common with getpaid plone project.
Credits
Proudly sponsored by SUNSCRAPERS
Tools used in rendering this package:
History
Version 2.0.0 (2019-08-26)
BREAKING: Complete redesign of internal API.
Payment becomes swappable model - like Django’s User model
Payment acts as customizable interface to PaymentProcessor
see documentation for full list
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_getpaid-2.0.0rc2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73814624396c482f2d066a8500aabae45fceacb097df92ec471c878788e450ee |
|
MD5 | df4b35a5c80275401bf976e6d2ee0f5c |
|
BLAKE2b-256 | 9809540f9dafde175fe6deefdc6a61bc4569e0bdda5c07c7093caa35fee0cd04 |