PayTM Integration based on Django REST Framework
Project description
PayTM | Django REST Framework
A package for PayTM integration in Django REST Framework
PayTM | Django REST Framework
is a Django packaged app that provides necessary views
based in Django REST Framework.
It enables easy integration of PayTM Payment Gateway with Web/Mobile Application with a RESTful API based server.
Contributors: WE'RE LOOKING FOR SOMEONE WHO CAN CONTRIBUTE IN DOCS
- Civil Machines Technologies Private Limited: For providing me platform and
funds for research work. This project is hosted currently with
CMT
only. - Himanshu Shankar: Himanshu Shankar has initiated this project and worked on this project to collect useful functions and classes that are being used in various projects.
Installation
- Download and Install via
pip
pip install drf_paytm
or
Download and Install via easy_install
easy_install drf_paytm
- Add, if wanted,
drfaddons
inINSTALLED_APPS
(This is although not required!)
INSTALLED_APPS = [
...
'drf_paytm',
...
]
- Also add other dependencies in
INSTALLED_APPS
INSTALLED_APPS = [
...
'drfaddons',
...
]
- Include urls of
drf_paytm
inurls.py
urlpatterns = [
...
path('api/paytm/', include('drf_paytm.urls')),
...
]
# or
urlpatterns = [
...
url(r'^api/paytm/', include('drf_paytm.urls')),
...
]
- Run migrate command:
python manage.py migrate
MODELS
The application has three models:
PayTMConfiguration
: You need to define your PayTM configurations in this model. Only one object can haveis_active
set toTrue
which will be used with PayTM API.TransactionRequest
: This will contain all the PayTM Transaction Request that one will create with PayTM.TransactionResponse
: This will contain all the responses received from PayTM API against transaction.
VIEWS
The application has following views:
ListAddTransactionRequestView
: All payment request should be made on this view. Requires a logged in user. It'll provide user with required data, includingchecksum hash
that will be used with PayTM API.ListAddTransactionResponseView
: All response data should be posted on this view. Doesn't requires a logged in user.PayNowTransaction
: This view is for testing w/o a frontend client. It will open PayTM payment page.
URLS
request/
: All payment request to be made via this URL.response/
: All payment response to be posted on this URL.now/
: For immediate testing of API, open this url.
Quickstart Guide
- Complete
Installation Steps
(mentioned above) - Create a configuration via
Django Admin
inPayTM Configuration
- Set
is_active
toTrue
- Note: Use sandbox mode credential at first
- Test API by accessing
/api/paytm/now/
endpoint - Use
PayTM Testing Credential
:
Mobile: 7777777777
OTP: 489871
Password: Paytm12345
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
drf_paytm-0.0.1.tar.gz
(13.3 kB
view hashes)
Built Distribution
drf_paytm-0.0.1-py3-none-any.whl
(27.7 kB
view hashes)
Close
Hashes for drf_paytm-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 456724b7ab51996ef0c3688adfc96b2b0c2ea60f7e2cbd28d0f2a6733e7af67b |
|
MD5 | 330218d78c79763397461218e5324166 |
|
BLAKE2b-256 | a97608d0b51210d15046199dfcdd4af2dc18422613e0adb4adb143f1eaed8e71 |