django-plans-payments


Namedjango-plans-payments JSON
Version 1.4.1 PyPI version JSON
download
home_pagehttps://github.com/PetrDlouhy/django-plans-payments
SummaryIntegration between django-plans and django-payments.
upload_time2024-04-24 07:17:34
maintainerNone
docs_urlNone
authorPetr Dlouhý
requires_pythonNone
licenseMIT
keywords django-plans-payments
VCS
bugtrack_url
requirements django-plans django-payments django-related-admin
Travis-CI No Travis.
coveralls test coverage
            =============================
Django plans payments
=============================

.. image:: https://badge.fury.io/py/django-plans-payments.svg
    :target: https://badge.fury.io/py/django-plans-payments

.. image:: https://github.com/PetrDlouhy/django-plans-payments/actions/workflows/main.yml/badge.svg
    :target: https://github.com/PetrDlouhy/django-plans-payments/actions/workflows/main.yml

.. image:: https://codecov.io/gh/PetrDlouhy/django-plans-payments/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/PetrDlouhy/django-plans-payments

Almost automatic integration between `django-plans <https://github.com/django-getpaid/django-plans>`_ and `django-payments <https://github.com/mirumee/django-payments>`_.
This will add payment buttons to the order page and automatically confirm the `Order` after the payment. Optionally, it can return the corresponding order when a payment is refunded.

Documentation
-------------

The full documentation is at https://django-plans-payments.readthedocs.io.

Quickstart
----------

Install and configure ``django-plans`` and ``django-payments`` apps.
Capture mode is not yet supported, so ``PAYMENT_VARINANTS`` with ``'capture': False`` will not get confirmed.

Install Django plans payments::

    pip install django-plans-payments

Add it to your ``INSTALLED_APPS``, before the ``plans``:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'related_admin',
        'plans_payments',
        'plans',
        ...
    )

Add Django ``plans_payments`` to the URL patterns:

.. code-block:: python

    urlpatterns = [
        ...
        url(r'^plans-payments', include('plans_payments.urls')),
        ...
    ]

Set ``django-plans`` settings and set model to:

.. code-block:: python

   PAYMENT_MODEL = 'plans_payments.Payment'

Customer IP address
-------------------

Customer IP address is stored in Payment model and used for some payment providers (i.e. PayU).
For security reasons `django-plans-payments` does acquire the IP only from ``request`` ``REMOTE_ADDR`` parameter.
If you are behind proxy, you will need to setup some mechanism to populate this variable from ``HTTP_X_FORWARDED_FOR`` parameter.
The suggested solution is to use `django-httpforwardedfor <https://github.com/PaesslerAG/django-httpxforwardedfor>`_ or `django-xff <https://github.com/ferrix/xff/>`_ application for that.

Running Tests
-------------

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install tox
    (myenv) $ tox

Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
-------

1.4.1 (2024-04-24)
++++++++++++++++++

* do not check whether a confirmed payment of a completed order is left anymore

1.4.0 (2024-04-15)
++++++++++++++++++

* migrate to `RecurringUserPlan.renewal_triggered_by`
* add `renewal_triggered_by` parameter to `Payment.set_renew_token`
* deprecate `automatic_renewal` parameter of `Payment.set_renew_token`; use `renewal_triggered_by` parameter instead
* deprecate `None` value of `renewal_triggered_by` parameter of `Payment.set_renew_token`; set an `AbstractRecurringUserPlan.RENEWAL_TRIGGERED_BY` instead

1.3.1 (2024-04-15)
++++++++++++++++++

* fix typo in payment description

1.3.0 (2024-04-12)
++++++++++++++++++

* add optional returning orders when payments are refunded

1.2.2 (2023-12-20)
++++++++++++++++++

* add change_reason for django-simple-history

1.2.1 (2023-12-19)
++++++++++++++++++

* specify sender=Payment for change_payment_status receiver

1.2.0 (2023-10-16)
++++++++++++++++++

* bugfix release (fix prevoius bad release)

1.1.3 (2023-10-15)
++++++++++++++++++

* add some indexes to Payment model

1.1.2 (2023-03-29)
++++++++++++++++++

* reword Payment description to ommit word "Subscribtion" which might raise warnings for banks/card providers

1.1.1 (2023-01-27)
++++++++++++++++++

* correction release, include wheel update, correctly rebase to master

1.1.0 (2023-01-27)
++++++++++++++++++

* Fix transaction fee double counting

1.0.1 (2022-12-09)
++++++++++++++++++

* Fix migrations

1.0.0 (2022-12-08)
++++++++++++++++++

* Recurring payments functionality

0.2.0 (2018-08-05)
++++++++++++++++++

* Payment process without capturing should work
* Automatic buttons generation

0.1.0 (2018-07-23)
++++++++++++++++++

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PetrDlouhy/django-plans-payments",
    "name": "django-plans-payments",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "django-plans-payments",
    "author": "Petr Dlouh\u00fd",
    "author_email": "petr.dlouhy@email.cz",
    "download_url": "https://files.pythonhosted.org/packages/80/8a/7a80c0188b31383c13c4028d91d8e3985361ea49fc39f4b34b95d46df0f0/django-plans-payments-1.4.1.tar.gz",
    "platform": null,
    "description": "=============================\nDjango plans payments\n=============================\n\n.. image:: https://badge.fury.io/py/django-plans-payments.svg\n    :target: https://badge.fury.io/py/django-plans-payments\n\n.. image:: https://github.com/PetrDlouhy/django-plans-payments/actions/workflows/main.yml/badge.svg\n    :target: https://github.com/PetrDlouhy/django-plans-payments/actions/workflows/main.yml\n\n.. image:: https://codecov.io/gh/PetrDlouhy/django-plans-payments/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/PetrDlouhy/django-plans-payments\n\nAlmost automatic integration between `django-plans <https://github.com/django-getpaid/django-plans>`_ and `django-payments <https://github.com/mirumee/django-payments>`_.\nThis will add payment buttons to the order page and automatically confirm the `Order` after the payment. Optionally, it can return the corresponding order when a payment is refunded.\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-plans-payments.readthedocs.io.\n\nQuickstart\n----------\n\nInstall and configure ``django-plans`` and ``django-payments`` apps.\nCapture mode is not yet supported, so ``PAYMENT_VARINANTS`` with ``'capture': False`` will not get confirmed.\n\nInstall Django plans payments::\n\n    pip install django-plans-payments\n\nAdd it to your ``INSTALLED_APPS``, before the ``plans``:\n\n.. code-block:: python\n\n    INSTALLED_APPS = (\n        ...\n        'related_admin',\n        'plans_payments',\n        'plans',\n        ...\n    )\n\nAdd Django ``plans_payments`` to the URL patterns:\n\n.. code-block:: python\n\n    urlpatterns = [\n        ...\n        url(r'^plans-payments', include('plans_payments.urls')),\n        ...\n    ]\n\nSet ``django-plans`` settings and set model to:\n\n.. code-block:: python\n\n   PAYMENT_MODEL = 'plans_payments.Payment'\n\nCustomer IP address\n-------------------\n\nCustomer IP address is stored in Payment model and used for some payment providers (i.e. PayU).\nFor security reasons `django-plans-payments` does acquire the IP only from ``request`` ``REMOTE_ADDR`` parameter.\nIf you are behind proxy, you will need to setup some mechanism to populate this variable from ``HTTP_X_FORWARDED_FOR`` parameter.\nThe suggested solution is to use `django-httpforwardedfor <https://github.com/PaesslerAG/django-httpxforwardedfor>`_ or `django-xff <https://github.com/ferrix/xff/>`_ application for that.\n\nRunning Tests\n-------------\n\nDoes the code actually work?\n\n::\n\n    source <YOURVIRTUALENV>/bin/activate\n    (myenv) $ pip install tox\n    (myenv) $ tox\n\nCredits\n-------\n\nTools used in rendering this package:\n\n*  Cookiecutter_\n*  `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n1.4.1 (2024-04-24)\n++++++++++++++++++\n\n* do not check whether a confirmed payment of a completed order is left anymore\n\n1.4.0 (2024-04-15)\n++++++++++++++++++\n\n* migrate to `RecurringUserPlan.renewal_triggered_by`\n* add `renewal_triggered_by` parameter to `Payment.set_renew_token`\n* deprecate `automatic_renewal` parameter of `Payment.set_renew_token`; use `renewal_triggered_by` parameter instead\n* deprecate `None` value of `renewal_triggered_by` parameter of `Payment.set_renew_token`; set an `AbstractRecurringUserPlan.RENEWAL_TRIGGERED_BY` instead\n\n1.3.1 (2024-04-15)\n++++++++++++++++++\n\n* fix typo in payment description\n\n1.3.0 (2024-04-12)\n++++++++++++++++++\n\n* add optional returning orders when payments are refunded\n\n1.2.2 (2023-12-20)\n++++++++++++++++++\n\n* add change_reason for django-simple-history\n\n1.2.1 (2023-12-19)\n++++++++++++++++++\n\n* specify sender=Payment for change_payment_status receiver\n\n1.2.0 (2023-10-16)\n++++++++++++++++++\n\n* bugfix release (fix prevoius bad release)\n\n1.1.3 (2023-10-15)\n++++++++++++++++++\n\n* add some indexes to Payment model\n\n1.1.2 (2023-03-29)\n++++++++++++++++++\n\n* reword Payment description to ommit word \"Subscribtion\" which might raise warnings for banks/card providers\n\n1.1.1 (2023-01-27)\n++++++++++++++++++\n\n* correction release, include wheel update, correctly rebase to master\n\n1.1.0 (2023-01-27)\n++++++++++++++++++\n\n* Fix transaction fee double counting\n\n1.0.1 (2022-12-09)\n++++++++++++++++++\n\n* Fix migrations\n\n1.0.0 (2022-12-08)\n++++++++++++++++++\n\n* Recurring payments functionality\n\n0.2.0 (2018-08-05)\n++++++++++++++++++\n\n* Payment process without capturing should work\n* Automatic buttons generation\n\n0.1.0 (2018-07-23)\n++++++++++++++++++\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Integration between django-plans and django-payments.",
    "version": "1.4.1",
    "project_urls": {
        "Homepage": "https://github.com/PetrDlouhy/django-plans-payments"
    },
    "split_keywords": [
        "django-plans-payments"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "98ec0b2210f735df5005273188e3dee03f613d3cab3e6f664e9c8dff6e14d014",
                "md5": "012098bce6f36567916a24e86f6ac19b",
                "sha256": "8995366548379a0d5780017ab53604ffff8a57e915ca1cb11b17858179821c6d"
            },
            "downloads": -1,
            "filename": "django_plans_payments-1.4.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "012098bce6f36567916a24e86f6ac19b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 18034,
            "upload_time": "2024-04-24T07:17:32",
            "upload_time_iso_8601": "2024-04-24T07:17:32.433664Z",
            "url": "https://files.pythonhosted.org/packages/98/ec/0b2210f735df5005273188e3dee03f613d3cab3e6f664e9c8dff6e14d014/django_plans_payments-1.4.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "808a7a80c0188b31383c13c4028d91d8e3985361ea49fc39f4b34b95d46df0f0",
                "md5": "414d364b4b3bc0ed592c529b38e62210",
                "sha256": "d1ad459c65cf24454071e055e3e9e6faa9a0ffa553364d789c7384532296e577"
            },
            "downloads": -1,
            "filename": "django-plans-payments-1.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "414d364b4b3bc0ed592c529b38e62210",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 30131,
            "upload_time": "2024-04-24T07:17:34",
            "upload_time_iso_8601": "2024-04-24T07:17:34.266725Z",
            "url": "https://files.pythonhosted.org/packages/80/8a/7a80c0188b31383c13c4028d91d8e3985361ea49fc39f4b34b95d46df0f0/django-plans-payments-1.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-24 07:17:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PetrDlouhy",
    "github_project": "django-plans-payments",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "django-plans",
            "specs": [
                [
                    ">=",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "django-payments",
            "specs": []
        },
        {
            "name": "django-related-admin",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "django-plans-payments"
}
        
Elapsed time: 0.26250s