Skip to main content

`django-thorbanks` provides a Django application for Estonian banklinks (iPizza protocol).

Project description

django-thorbanks

Build Status Coverage Status PyPI release

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:

pip install django-thorbanks

Pipenv:

pipenv install django-thorbanks

Poetry:

poetry add django-thorbanks

2. Add to installed apps

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

3. Configure and create migrations:

With MANUAL_MODELS:

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.

# Tell django that thorbanks migrations are in thorbanks_models app
MIGRATION_MODULES = {"thorbanks": "shop.thorbanks_models.migrations"}

And run makemigrations & migrate management commands.

4. Link it to your Order model

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

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

5. Include thorbanks urls

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

6. Add listeners to banklinks success & failure callbacks:

See example.shop.models.banklink_success_callback and example.shop.models.banklink_failed_callback.

7. Create views and forms for payments:

see example.shop.views and example.shop.views.

iPizza protocol

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-thorbanks-0.6.0a2.tar.gz (52.0 kB view details)

Uploaded Source

Built Distribution

django_thorbanks-0.6.0a2-py3-none-any.whl (65.8 kB view details)

Uploaded Python 3

File details

Details for the file django-thorbanks-0.6.0a2.tar.gz.

File metadata

  • Download URL: django-thorbanks-0.6.0a2.tar.gz
  • Upload date:
  • Size: 52.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.7.5 Linux/5.0.0-1026-gcp

File hashes

Hashes for django-thorbanks-0.6.0a2.tar.gz
Algorithm Hash digest
SHA256 e351edb1f6d8b87d434ce17b1b8e520126ef58d78e9d3c38be2a08c3ef774d53
MD5 c551c9612ebd5147ce71ac3f6a395146
BLAKE2b-256 4c27a0bc04e56fcf42f6d9cc2a9649d1eeac54662dc0dac20baaa3cc6c2d147e

See more details on using hashes here.

File details

Details for the file django_thorbanks-0.6.0a2-py3-none-any.whl.

File metadata

  • Download URL: django_thorbanks-0.6.0a2-py3-none-any.whl
  • Upload date:
  • Size: 65.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.3 CPython/3.7.5 Linux/5.0.0-1026-gcp

File hashes

Hashes for django_thorbanks-0.6.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd1cc7afc4229659999c256a4bb24ed04ed0c3e13edbf6f3a75122c8072a3c2a
MD5 432933947bbe37d39b6d710924032d02
BLAKE2b-256 754194a067d4f39d8781c6583d644eaa3613768c1c0d136640e675ba6151fe46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page