Django Paytm Checkout
A simple modular approach for Paytm's checkout and custom checkout
Documentation is yet to be done
This is currently in beta phase
Installation
Use pip to install from PyPI:
pip install django-paytm-checkout
Configuration
Configure your django project by adding the following in your settings:
PAYTM_MERCHANT_ID = 'YOUR_PAYTM_MERCHANT_ID'
PAYTM_MERCHANT_KEY = 'YOUR_PAYTM_MERCHANT_KEY'
PAYTM_INDUSTRY = 'YOUR_INDUSTRY_TYPE'
PAYTM_WEBSITE = 'YOUR_PAYTM_WEBSITE'
Setting the environment:
PAYTM_DEBUG = True
# default: True (for staging)
# False (for production)
These are optional settings, change if it not the same as default:
PAYTM_CHANNEL_WEBSITE = '' # default: WEB
PAYTM_CHANNEL_MOBILE_APP = '' # default: WAP
PAYTM_STAGING_DOMAIN = '' # default: securegw-stage.paytm.in
PAYTM_PRODUCTION_DOMAIN = '' # default: securegw.paytm.in
Using Default application
Add the following into your urls.py
from django.urls import path, include
urlpatterns = [
path('paytm/', include('paytm.urls', namespace='paytm')),
]
Customising views
You can override all the Generic custom views
ex: Customising and using the initiate view
from django.conf import settings as django_settings
from django.shortcuts import render, Http404
from paytm.checkout.views import GenericInitiatePaymentView
from paytm.models import Item
class InitiatePaymentView(GenericInitiatePaymentView):
"""Wrapper for testing"""
include_payment_charge = False
channel = 'WEB'
def get_amount(self):
item_id = self.request.POST['item']
item = Item.objects.get(pk=item_id)
return item.price
def get(self, request):
if not django_settings.DEBUG:
raise Http404
self.request = request
return render(request, 'paytm/checkout/index.html', {
'items': Item.objects.all()
})
Metadata
Release files for django-paytm-checkout 0.0.3
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 | Actions |
|---|---|---|---|---|
| django-paytm-checkout-0.0.3.tar.gz | 10.3 kB | Without provenance | Details for django-paytm-checkout-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_paytm_checkout-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for django_paytm_checkout-0.0.3-py3-none-any.whl |
Total release size: 25.7 kB
Release files / django-paytm-checkout-0.0.3.tar.gz
| Download URL | django-paytm-checkout-0.0.3.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22bca261173fa99d13791e2c460aacc665285852d2300cbff37b03b92478dc97
|
|
BLAKE2b-256 checksum How to use checksums |
175b1d3f7217e9ad545841a5d8f49b63f69bca9cf12e2e41b502098da092141f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.4
|
Release files / django_paytm_checkout-0.0.3-py3-none-any.whl
| Download URL | django_paytm_checkout-0.0.3-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbbad3978cf9f7a9802ed072242f8614c8dbb5b05b938032a1df0dfb59803a31
|
|
BLAKE2b-256 checksum How to use checksums |
4d655fbf64224385cbbc8ec7db8829efd7e18bfeb29227bb9a9178cee0273422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.4
|
Security for django-paytm-checkout 0.0.3
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.