Skip to main content

A quick package for integrating Vnpay payment gateway.

Project description

Django-vnpay

A quick package for integrating Vnpay payment gateway. Version 0.0.13

Quick start

  1. Add "vnpay" to INSTALLED_APPS in setting.py
INSTALLED_APPS = [
    ...
    'vnpay',
]
  1. Add env variable in settings.py
VNPAY_TMN_CODE = env('VNPAY_TMN_CODE')
VNPAY_HASH_SECRET_KEY = env('VNPAY_HASH_SECRET_KEY')
VNPAY_PAYMENT_URL = env('VNPAY_PAYMENT_URL')
VNPAY_RETURN_URL = env('VNPAY_RETURN_URL')
  1. Include the vnpay URLconf in your project urls.py
path('vnpay/', include('vnpay.api_urls')),
  1. Run python manage.py migrate to create related models

  2. Start the development server and visit http://127.0.0.1:8000/

http://127.0.0.1:8000/admin/ to see the Billing
http://127.0.0.1:8000/vnpay/ to see the urls

Usage

  1. Call api payment_url
  • It will create billing
  • It will return url to pay
  1. User pay with payment_url
  2. Vnpay will return result to
  • api payment_ipn
  • api payment_return

Note: Give the api payment_ipn and payment_return to VNPAY support.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-vnpay-0.0.13.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_vnpay-0.0.13-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file django-vnpay-0.0.13.tar.gz.

File metadata

  • Download URL: django-vnpay-0.0.13.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for django-vnpay-0.0.13.tar.gz
Algorithm Hash digest
SHA256 dc0e57a3c94d44b02b74b8a4d89e8e51d2661a6a0d243c91e986afd16bf418b6
MD5 5b8d876285d78c6d07e72306da633164
BLAKE2b-256 e2115789e0671386638f308c80e170cd7419367a2e504c073440c149bed9c427

See more details on using hashes here.

File details

Details for the file django_vnpay-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: django_vnpay-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for django_vnpay-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 b45bd2fa3a6bc649ae01698bb48208d7a2f90980b2483c893f095494f8a045fa
MD5 f4602328a11703908e426f3f9c050a65
BLAKE2b-256 26f393cac03e57c0adf17a98d3481aab31d19d6072cebe771c5273198008dfda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page