django-thorbanks


Namedjango-thorbanks JSON
Version 0.7.2 PyPI version JSON
download
home_pagehttp://thorgate.eu
Summary`django-thorbanks` provides a Django application for Estonian banklinks (iPizza protocol).
upload_time2024-01-03 09:51:05
maintainer
docs_urlNone
authorThorgate
requires_python>=3.7,<4.0
licenseBSD-3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            # django-thorbanks

[![Build Status](https://travis-ci.org/thorgate/django-thorbanks.svg?branch=master)](https://travis-ci.org/thorgate/django-thorbanks)
[![Coverage Status](https://coveralls.io/repos/github/thorgate/django-thorbanks/badge.svg?branch=master)](https://coveralls.io/github/thorgate/django-thorbanks?branch=master)
[![PyPI release](https://badge.fury.io/py/django-thorbanks.png)](https://badge.fury.io/py/django-thorbanks)


Django app for integrating Estonian banklinks into your project.

## Features

Bank            | Protocol    | Authentication      | Payment
--------------- | ----------- | ------------------- | -------
Swedbank        | iPizza      | :heavy_check_mark:  | :heavy_check_mark:
SEB             | iPizza      | :heavy_check_mark:  | :heavy_check_mark:
Danske          | iPizza      | :heavy_check_mark:  | :heavy_check_mark:
LHV             | iPizza      | :heavy_check_mark:  | :heavy_check_mark:
Krediidipank    | iPizza      | :heavy_check_mark:  | :heavy_check_mark:
Nordea          | iPizza      | :heavy_check_mark:  | :heavy_check_mark:

## Usage

### 1. Install it:

**Pip:**

```bash
pip install django-thorbanks
```

**Pipenv:**

```bash
pipenv install django-thorbanks
```

**Poetry:**

```bash
poetry add django-thorbanks
```

### 2. Add to installed apps

```python
INSTALLED_APPS = (
    # Add the following apps:
    "thorbanks",
    "thorbanks_models",
)
```

### 3. Configure and create migrations:

**With MANUAL_MODELS:**

- Remove `"thorbanks_models"` from `INSTALLED_APPS`
- follow instructions from [thorbanks.settings.get_model](./thorbanks/settings.py#L59).

**With default models:**

Make django aware that thorbanks migrations are in your local apps folder via settings.MIGRATION_MODULES:

> Note: Replace `shop` with the name of an existing app in your project.

```python
# Tell django that thorbanks_models migrations are in shop app (in thorbanks_migrations module)
MIGRATION_MODULES = {"thorbanks_models": "shop.thorbanks_migrations"}
```

Now run `makemigrations thorbanks_models` and `migrate` management commands to create and apply the migrations.

### 4. Add settings.BANKLINKS

For a working example see the definitions in [example/settings.py](example/settings.py).

> Note:
>You will need a public and private key for each bank integration.
>In case you don't have the public key, you can generate one out of a certificate by:
>```
>openssl x509 -pubkey -noout -in cert.pem  > pubkey.pem
>```

### 5. Link Transaction to your Order model

> Note: When using MANUAL_MODELS replace `thorbanks_models` with your local app name

```python
class Order(models.Model):
    # ... other fields
    transaction = models.OneToOneField(
        "thorbanks_models.Transaction", null=True, on_delete=models.SET_NULL
    )
```

### 6. Include thorbanks urls

```python
urlpatterns = [
    # This is where the user will be redirected after returning from the banklink page
    url(r"^banks/", include("thorbanks.urls")),
]
```

### 7. Add listeners to banklinks success & failure callbacks:

See [example.shop.models.banklink_success_callback](example/shop/models.py#L23) and [example.shop.models.banklink_failed_callback](example/shop/models.py#L44).

### 8. Create views and forms for payments:

see [example.shop.views](example/shop/views.py) and [example.shop.forms](example/shop/forms.py).

## iPizza protocol

- [Test service](https://banks.pastel.thorgate.eu/et/info)
- [Swedbank](https://www.swedbank.ee/business/cash/ecommerce/ecommerce?language=EST)
    - [Spec](https://www.swedbank.ee/static/pdf/business/d2d/paymentcollection/Pangalingi_paringute_tehniline_spetsifikatsioon_09_10_2014.pdf)
- [SEB](https://www.seb.ee/ariklient/igapaevapangandus/pangalink)
- [LHV Bank](https://www.lhv.ee/pangateenused/pangalink/)

            

Raw data

            {
    "_id": null,
    "home_page": "http://thorgate.eu",
    "name": "django-thorbanks",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thorgate",
    "author_email": "info@thorgate.eu",
    "download_url": "https://files.pythonhosted.org/packages/89/1f/b656c2da2dbcfde9df861be38225f67851c0803c7b1e77ecabed9fcf81a7/django_thorbanks-0.7.2.tar.gz",
    "platform": null,
    "description": "# django-thorbanks\n\n[![Build Status](https://travis-ci.org/thorgate/django-thorbanks.svg?branch=master)](https://travis-ci.org/thorgate/django-thorbanks)\n[![Coverage Status](https://coveralls.io/repos/github/thorgate/django-thorbanks/badge.svg?branch=master)](https://coveralls.io/github/thorgate/django-thorbanks?branch=master)\n[![PyPI release](https://badge.fury.io/py/django-thorbanks.png)](https://badge.fury.io/py/django-thorbanks)\n\n\nDjango app for integrating Estonian banklinks into your project.\n\n## Features\n\nBank            | Protocol    | Authentication      | Payment\n--------------- | ----------- | ------------------- | -------\nSwedbank        | iPizza      | :heavy_check_mark:  | :heavy_check_mark:\nSEB             | iPizza      | :heavy_check_mark:  | :heavy_check_mark:\nDanske          | iPizza      | :heavy_check_mark:  | :heavy_check_mark:\nLHV             | iPizza      | :heavy_check_mark:  | :heavy_check_mark:\nKrediidipank    | iPizza      | :heavy_check_mark:  | :heavy_check_mark:\nNordea          | iPizza      | :heavy_check_mark:  | :heavy_check_mark:\n\n## Usage\n\n### 1. Install it:\n\n**Pip:**\n\n```bash\npip install django-thorbanks\n```\n\n**Pipenv:**\n\n```bash\npipenv install django-thorbanks\n```\n\n**Poetry:**\n\n```bash\npoetry add django-thorbanks\n```\n\n### 2. Add to installed apps\n\n```python\nINSTALLED_APPS = (\n    # Add the following apps:\n    \"thorbanks\",\n    \"thorbanks_models\",\n)\n```\n\n### 3. Configure and create migrations:\n\n**With MANUAL_MODELS:**\n\n- Remove `\"thorbanks_models\"` from `INSTALLED_APPS`\n- follow instructions from [thorbanks.settings.get_model](./thorbanks/settings.py#L59).\n\n**With default models:**\n\nMake django aware that thorbanks migrations are in your local apps folder via settings.MIGRATION_MODULES:\n\n> Note: Replace `shop` with the name of an existing app in your project.\n\n```python\n# Tell django that thorbanks_models migrations are in shop app (in thorbanks_migrations module)\nMIGRATION_MODULES = {\"thorbanks_models\": \"shop.thorbanks_migrations\"}\n```\n\nNow run `makemigrations thorbanks_models` and `migrate` management commands to create and apply the migrations.\n\n### 4. Add settings.BANKLINKS\n\nFor a working example see the definitions in [example/settings.py](example/settings.py).\n\n> Note:\n>You will need a public and private key for each bank integration.\n>In case you don't have the public key, you can generate one out of a certificate by:\n>```\n>openssl x509 -pubkey -noout -in cert.pem  > pubkey.pem\n>```\n\n### 5. Link Transaction to your Order model\n\n> Note: When using MANUAL_MODELS replace `thorbanks_models` with your local app name\n\n```python\nclass Order(models.Model):\n    # ... other fields\n    transaction = models.OneToOneField(\n        \"thorbanks_models.Transaction\", null=True, on_delete=models.SET_NULL\n    )\n```\n\n### 6. Include thorbanks urls\n\n```python\nurlpatterns = [\n    # This is where the user will be redirected after returning from the banklink page\n    url(r\"^banks/\", include(\"thorbanks.urls\")),\n]\n```\n\n### 7. Add listeners to banklinks success & failure callbacks:\n\nSee [example.shop.models.banklink_success_callback](example/shop/models.py#L23) and [example.shop.models.banklink_failed_callback](example/shop/models.py#L44).\n\n### 8. Create views and forms for payments:\n\nsee [example.shop.views](example/shop/views.py) and [example.shop.forms](example/shop/forms.py).\n\n## iPizza protocol\n\n- [Test service](https://banks.pastel.thorgate.eu/et/info)\n- [Swedbank](https://www.swedbank.ee/business/cash/ecommerce/ecommerce?language=EST)\n    - [Spec](https://www.swedbank.ee/static/pdf/business/d2d/paymentcollection/Pangalingi_paringute_tehniline_spetsifikatsioon_09_10_2014.pdf)\n- [SEB](https://www.seb.ee/ariklient/igapaevapangandus/pangalink)\n- [LHV Bank](https://www.lhv.ee/pangateenused/pangalink/)\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "`django-thorbanks` provides a Django application for Estonian banklinks (iPizza protocol).",
    "version": "0.7.2",
    "project_urls": {
        "Homepage": "http://thorgate.eu",
        "Repository": "https://github.com/thorgate/django-thorbanks"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a5ac0c2a5b93e962863daf71c7b31518629f2b5054c88f3ada8994c395d7f43",
                "md5": "7c210e0a47d59c31992cd2a1a3535194",
                "sha256": "80aa8a90c2f17b335ca1915ec3f236cecb7f43ad6e41ea355d5ec069198745b1"
            },
            "downloads": -1,
            "filename": "django_thorbanks-0.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7c210e0a47d59c31992cd2a1a3535194",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 48567,
            "upload_time": "2024-01-03T09:51:02",
            "upload_time_iso_8601": "2024-01-03T09:51:02.927560Z",
            "url": "https://files.pythonhosted.org/packages/3a/5a/c0c2a5b93e962863daf71c7b31518629f2b5054c88f3ada8994c395d7f43/django_thorbanks-0.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "891fb656c2da2dbcfde9df861be38225f67851c0803c7b1e77ecabed9fcf81a7",
                "md5": "87d119186db2d57aa1fe6579f02f41d1",
                "sha256": "7bc1a55f4f1f5732691d9a0df782f4d6acad38997a53ce46b6881e568f722a58"
            },
            "downloads": -1,
            "filename": "django_thorbanks-0.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "87d119186db2d57aa1fe6579f02f41d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 42421,
            "upload_time": "2024-01-03T09:51:05",
            "upload_time_iso_8601": "2024-01-03T09:51:05.010903Z",
            "url": "https://files.pythonhosted.org/packages/89/1f/b656c2da2dbcfde9df861be38225f67851c0803c7b1e77ecabed9fcf81a7/django_thorbanks-0.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-03 09:51:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thorgate",
    "github_project": "django-thorbanks",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "tox": true,
    "lcname": "django-thorbanks"
}
        
Elapsed time: 0.21768s