No project description provided
Project description
Paynet Software Development Kit
Installation
pip install paynet-pkg
Installation to Django
Add 'paynet' in to your settings.py
INSTALLED_APPS = [
...
'paynet',
...
]
Add 'paynet' credentials inside to settings.py
Paynet configuration settings.py
PAYNET_USERNAME = "your-paynet-username"
PAYNET_PASSWORD = "your-paynet-password"
PAYNET_ACCOUNT_FIELD = "order_id"
PAYNET_ACCOUNT_MODEL = "order.models.Order"
Create a new View that about handling call backs
from paynet.views import PaynetWebhook
class PaynetWebhookAPIView(PaynetWebhook):
def successfully_payment(self, params):
"""
successfully payment method process you can ovveride it
"""
print(f"payment successful params: {params}")
def cancelled_payment(self, params):
"""
cancelled payment method process you can ovveride it
"""
print(f"payment cancelled params: {params}")
Add a payme path to core of urlpatterns:
from django.urls import path
from django.urls import include
from your_app.views import PaynetWebhookAPIView
urlpatterns = [
...
path("payment/paynet/update/", PaynetWebhookAPIView.as_view()),
...
]
Run migrations
python3 manage.py makemigrations && python manage.py migrate
🎉 Congratulations you have been integrated paynet with django, keep reading docs. After successfull migrations check your admin panel and see results what happened.
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
paynet-pkg-0.2.tar.gz
(8.8 kB
view details)
File details
Details for the file paynet-pkg-0.2.tar.gz.
File metadata
- Download URL: paynet-pkg-0.2.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.11.2 readme-renderer/43.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.2.3 tqdm/4.67.1 importlib-metadata/8.5.0 keyring/25.5.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66b0a80b61c711ee33b2bd5388b4b1671acbf76c74256ccfcc671d288b847a14
|
|
| MD5 |
c7a96cf1f7d7c91804660aa80b1adf4e
|
|
| BLAKE2b-256 |
2de5496dd4bd4e9f1b70f8207077027410822b76cf6ae9b1ab6fd52be0c4a6c4
|