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-11-29)

  • 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.0rc3.tar.gz (15.9 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.0rc3-py2.py3-none-any.whl (20.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: django-getpaid-2.0.0rc3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.9

File hashes

Hashes for django-getpaid-2.0.0rc3.tar.gz
Algorithm Hash digest
SHA256 291f0c9de4206e1668e8ae629169add8be42ead25c68c92703872eb0434cefb8
MD5 da662cb62192321b890e31b01eeef360
BLAKE2b-256 c6d916fffa7144ed07d42046c7b47a5730cc1b0dc6cc40825796582cbfa8b729

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_getpaid-2.0.0rc3-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.6.9

File hashes

Hashes for django_getpaid-2.0.0rc3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d30493b6d7826225567402109b558031bbf204b3b77fcee0f3a1cde3968becf4
MD5 0e21cb899ce31f8a8e42e0f950f3e6fa
BLAKE2b-256 1ed5965fb89f519f419c9e02675215b34ef36d9b6ab80d9136ccd31c616cda22

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