`django-thorbanks` provides a Django application for Estonian banklinks (iPizza protocol).
Project description
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:
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:
- Remove
"thorbanks_models"
fromINSTALLED_APPS
- follow instructions from thorbanks.settings.get_model.
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"}
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
Release history Release notifications | RSS feed
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.0a1.tar.gz
(51.6 kB
view hashes)
Built Distribution
Close
Hashes for django_thorbanks-0.6.0a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60cbb638b1677df3860563d57cc780bcf79bf15ed568978e614cc2eaa13c070e |
|
MD5 | f124a842b72d00b83f3c872057a6c626 |
|
BLAKE2b-256 | 8c691959c04c143a553930703b19a569acc00dbfb8db77d8a3f2bc76a912db58 |