Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

paynet-pkg

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paynet-pkg

  • 0.2
  • PyPI
  • Socket score

Maintainers
1

Paynet Software Development Kit

Support Group on Telegram

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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc