Skip to main content

DjangoPay2

https://travis-ci.org/la1t/django_pay2.svg?branch=master

Интеграция платежных систем для Django

Quickstart

Установите DjangoPay2:

pip install django_pay2

Добавьте приложение в INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'django_pay2',
    ...
)

Добавьте Django Pay’s URLы в urlpatterns:

urlpatterns = [
    ...
    path('payments/', include('django_pay2.urls')),
    ...
]

Платежи

Любой платеж создается методом create_<название-платежной-системы>_payment. Метод возвращает объект типа PaymentMethod. Существует два типа PaymentMethod — PaymentForm и RedirectMethod. Первый должен сериализовываться и отправляться на front. Второй можно либо также сериализовать и отправить на фронт, либо возвратить редирект.

Так же метод создает объект типа Payment. Эта модель отвечает за сохранение информации о платеже, а так же об объекте-инициаторе платежа. После успешной оплаты он отправляет сигнал payment_received привязанному объекту.

TODO

  • [*] Сериализаторы для PaymentForm и RedirectMethod

  • [ ] Интеграция с free_kassa

  • [ ] handle_form_debug проверяет, что ему пришла валидная форма

  • [*] Переписывание тестов на pytest

  • [ ] Инструкция по написанию собственных провайдеров

  • [ ] Инструкция по добавлению и настройке каждого провайдера

  • [ ] Более подробная инструкция по использованию

  • [*] Инструкция по увеличению версии

Разработка

Установка development зависимостей

::

pip install -r requirements_dev.txt

Запуск тестов

::

tox

Выпуск

  1. Установить новую версию в pyproject.toml’ и `__init__.py файлах

  2. poetry publish –build

Metadata

Release files for django-pay2 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-pay2 2.1.0
File Size Uploaded Provenance Actions
django_pay2-2.1.0.tar.gz 23.6 kB Without provenance Details for django_pay2-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-pay2 2.1.0
File Interpreter ABI Platform Actions
django_pay2-2.1.0-py3-none-any.whl Python 3 none any Details for django_pay2-2.1.0-py3-none-any.whl

Total release size: 69.5 kB

Release files / django_pay2-2.1.0.tar.gz

Download URL django_pay2-2.1.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
38f35091a15793981b8fa0f3273dd471b87c6a6d098c0da96c3de6776a2ae9f5
BLAKE2b-256 checksum
How to use checksums
64633abcdab922b065fcf3eaac96b4946960b2ef986bc796af84757f41303e8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.8.10 Linux/5.8.0-63-generic

Release files / django_pay2-2.1.0-py3-none-any.whl

Download URL django_pay2-2.1.0-py3-none-any.whl
Size 45.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14ca5371ef8edf62b48125a953bf71406f335b66a720414cb4914ba1cf34c245
BLAKE2b-256 checksum
How to use checksums
2fdfd6781cc94f0f9d8839e9be865b8e3bd79cdf5ab7d3bfa74e762dafb406f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.8.10 Linux/5.8.0-63-generic

Security for django-pay2 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page