Skip to main content

Multi-broker payment processor for Django

Project description

Latest PyPI version https://img.shields.io/travis/sunscrapers/django-getpaid.svg https://img.shields.io/coveralls/github/cypreess/django-getpaid.svg https://img.shields.io/pypi/wheel/django-getpaid.svg https://img.shields.io/pypi/l/django-getpaid.svg

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-getpaid-2.0.0rc2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_getpaid-2.0.0rc2-py2.py3-none-any.whl (19.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-getpaid-2.0.0rc2.tar.gz.

File metadata

  • Download URL: django-getpaid-2.0.0rc2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for django-getpaid-2.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 16e50a5034d480e0b283b2f152819d06fb556f9236ba4966cee621da858fbe7c
MD5 400a816703d244a6ff294dd62c09ac7f
BLAKE2b-256 cfe7e40d679806abbb8744a57c6b8f820296e7e6607bd2d2ab2be4f61842bafa

See more details on using hashes here.

File details

Details for the file django_getpaid-2.0.0rc2-py2.py3-none-any.whl.

File metadata

  • Download URL: django_getpaid-2.0.0rc2-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for django_getpaid-2.0.0rc2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 73814624396c482f2d066a8500aabae45fceacb097df92ec471c878788e450ee
MD5 df4b35a5c80275401bf976e6d2ee0f5c
BLAKE2b-256 9809540f9dafde175fe6deefdc6a61bc4569e0bdda5c07c7093caa35fee0cd04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page