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
shopwith the name of an existing app in your project.
# 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.
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_modelswith your local app name
class Order(models.Model):
# ... other fields
transaction = models.OneToOneField(
"thorbanks_models.Transaction", null=True, on_delete=models.SET_NULL
)
6. Include thorbanks urls
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 and example.shop.models.banklink_failed_callback.
8. Create views and forms for payments:
see example.shop.views and example.shop.forms.
iPizza protocol
Metadata
Release files for django-thorbanks 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django_thorbanks-0.7.2.tar.gz | 42.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_thorbanks-0.7.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.0 kB
Release files / django_thorbanks-0.7.2.tar.gz
| Download URL | django_thorbanks-0.7.2.tar.gz |
|---|---|
| Size | 42.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bc1a55f4f1f5732691d9a0df782f4d6acad38997a53ce46b6881e568f722a58
|
|
BLAKE2b-256 checksum How to use checksums |
891fb656c2da2dbcfde9df861be38225f67851c0803c7b1e77ecabed9fcf81a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.6 Linux/6.6.2-arch1-1
|
Release files / django_thorbanks-0.7.2-py3-none-any.whl
| Download URL | django_thorbanks-0.7.2-py3-none-any.whl |
|---|---|
| Size | 48.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80aa8a90c2f17b335ca1915ec3f236cecb7f43ad6e41ea355d5ec069198745b1
|
|
BLAKE2b-256 checksum How to use checksums |
3a5ac0c2a5b93e962863daf71c7b31518629f2b5054c88f3ada8994c395d7f43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.0 CPython/3.11.6 Linux/6.6.2-arch1-1
|
Security for django-thorbanks 0.7.2
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.