paytm-sdk

0.0.2 • Public • Published

NodeJS Paytm Checksum SDK

npm version Dependency Status

Unofficial Node.JS SDK for Paytm Checksum Generation and Verification

Installation

$ npm install paytm-sdk --save

Usage

const Paytm = require('paytm-sdk')
const paytm = new Paytm('<merchantkey>', options)
 
const express = require('express')
const bodyParser = require('body-parser')
 
const app = express()
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({extended: true}))
app.use('/', paytm.middleware())
 
app.listen(8000)

Options

const paytm = new Paytm('<merchantkey>', {
  generateRoute: '/checksum/generate', 
  verifyRoute: '/checksum/verify',
  handleError: false
})
generateRoute

This is route where you can send a POST request to generate checksum. The default value is set to /checksum/generate

verifyRoute

This is route where you can send a POST request to verify checksum. The default value is set to /checksum/verify

handleError

Set this to true if you do not want to handle the error condition, instead want the library to send 500 for checksum generation failure and 400 for incorrect checksum

Release Notes

Release Notes
0.0.1 Priliminary release

Licence

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i paytm-sdk

Weekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • saswatds