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.0rc1.tar.gz (15.7 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.0rc1-py2.py3-none-any.whl (19.7 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: django-getpaid-2.0.0rc1.tar.gz
  • Upload date:
  • Size: 15.7 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.0rc1.tar.gz
Algorithm Hash digest
SHA256 61be3cf9ead43c30e118491fa0243b2b658772c15d37838b27faf45300356987
MD5 5cdae96b23a2a1e8f23d908039fd64bd
BLAKE2b-256 896790e4ce367530e4491c99f73fd666259b99d82bea3785d6f848d07e894eea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_getpaid-2.0.0rc1-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.0rc1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6c0ecbc91e6c700efefa14aa241e8571c16e9566c0baa1ec2bd64afb04f2f1ff
MD5 9d2a0ebb919baed318970168794cc23b
BLAKE2b-256 7b7b14e29fcdf7c823117dcf59e05ff9e4b97a77f56c4406608d95505f50d559

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