<h1 align="center">Paynet Software Development Kit</h1>
<p align="center">
<a href="https://t.me/+lO97J78xBj45MzBi">
<img src="https://img.shields.io/badge/Support%20Group-blue?logo=telegram&logoColor=white" alt="Support Group on Telegram"/>
</a>
</p>
## Installation
```shell
pip install paynet-pkg
```
## Installation to Django
Add `'paynet'` in to your settings.py
```python
INSTALLED_APPS = [
...
'paynet',
...
]
```
Add `'paynet'` credentials inside to settings.py
Paynet configuration settings.py
```python
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
```python
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:
```python
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
```shell
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/Muhammadali-Akbarov/paynet-pkg",
"name": "paynet-pkg",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "paynet, paynet-merchant, paynet-pkg, paynet-api, paynet-python-integration, paynet-integration, paynet-python, paynet-gateway, paynet-payment, paynet-payment-gateway, paynet-integration-python, paynet-api-client, paynet-django, paynet-rest-api",
"author": "Muhammadali Akbarov",
"author_email": "muhammadali17abc@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/57/01/4430b83f70bff089919b327660614cec5a72877eb40a1d038de5cd5aded7/paynet_pkg-0.3.tar.gz",
"platform": null,
"description": "<h1 align=\"center\">Paynet Software Development Kit</h1>\n\n<p align=\"center\">\n <a href=\"https://t.me/+lO97J78xBj45MzBi\">\n <img src=\"https://img.shields.io/badge/Support%20Group-blue?logo=telegram&logoColor=white\" alt=\"Support Group on Telegram\"/>\n </a>\n</p>\n\n\n## Installation\n\n```shell\npip install paynet-pkg\n```\n\n## Installation to Django\n\nAdd `'paynet'` in to your settings.py\n\n```python\nINSTALLED_APPS = [\n ...\n 'paynet',\n ...\n]\n```\n\nAdd `'paynet'` credentials inside to settings.py\n\nPaynet configuration settings.py\n```python\nPAYNET_USERNAME = \"your-paynet-username\"\nPAYNET_PASSWORD = \"your-paynet-password\"\nPAYNET_ACCOUNT_FIELD = \"order_id\"\nPAYNET_ACCOUNT_MODEL = \"order.models.Order\"\n```\n\nCreate a new View that about handling call backs\n```python\nfrom paynet.views import PaynetWebhook\n\n\nclass PaynetWebhookAPIView(PaynetWebhook):\n def successfully_payment(self, params):\n \"\"\"\n successfully payment method process you can ovveride it\n \"\"\"\n print(f\"payment successful params: {params}\")\n\n def cancelled_payment(self, params):\n \"\"\"\n cancelled payment method process you can ovveride it\n \"\"\"\n print(f\"payment cancelled params: {params}\")\n```\n\nAdd a `payme` path to core of urlpatterns:\n\n```python\nfrom django.urls import path\nfrom django.urls import include\n\nfrom your_app.views import PaynetWebhookAPIView\n\nurlpatterns = [\n ...\n path(\"payment/paynet/update/\", PaynetWebhookAPIView.as_view()),\n ...\n]\n```\n\nRun migrations\n```shell\npython3 manage.py makemigrations && python manage.py migrate\n```\n\n\ud83c\udf89 Congratulations you have been integrated paynet with django, keep reading docs. After successfull migrations check your admin panel and see results what happened.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.3",
"project_urls": {
"Homepage": "https://github.com/Muhammadali-Akbarov/paynet-pkg"
},
"split_keywords": [
"paynet",
" paynet-merchant",
" paynet-pkg",
" paynet-api",
" paynet-python-integration",
" paynet-integration",
" paynet-python",
" paynet-gateway",
" paynet-payment",
" paynet-payment-gateway",
" paynet-integration-python",
" paynet-api-client",
" paynet-django",
" paynet-rest-api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "57014430b83f70bff089919b327660614cec5a72877eb40a1d038de5cd5aded7",
"md5": "47a3793f8b8a2591f8abb614f9ca202d",
"sha256": "278eef85e7f8dd7156ab3fec3d0a91934b892cd9267614cdd3024c96a15e2909"
},
"downloads": -1,
"filename": "paynet_pkg-0.3.tar.gz",
"has_sig": false,
"md5_digest": "47a3793f8b8a2591f8abb614f9ca202d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8298,
"upload_time": "2024-12-12T15:41:29",
"upload_time_iso_8601": "2024-12-12T15:41:29.952357Z",
"url": "https://files.pythonhosted.org/packages/57/01/4430b83f70bff089919b327660614cec5a72877eb40a1d038de5cd5aded7/paynet_pkg-0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-12 15:41:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Muhammadali-Akbarov",
"github_project": "paynet-pkg",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "paynet-pkg"
}