npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-plugin-paytmx

v0.0.11

Published

This Plugin allows you to integrate PayTM application into a cordova app.

Readme

Installation

cordova plugin add cordova-plugin-paytm --variable MERCHANT_ID=<MerchantID> --variable INDUSTRY_TYPE_ID=<IndustryType> --variable WEBSITE=<WAPWebsiteName> --save

Note: - For Ionic Implementation, refer README-IONIC.md

Supported Platform

Android iOS

Usage

Add below line to declaration.d.ts file

declare var paytm : any;

Now you can start a transaction by using below lines

paytm.startPayment(options, successCallback, failureCallback);

"options" is where you send payment, payee & collector information to paytm plugin. Sample "options" that has to be send to the plugin to start the transactions is

{
  "ENVIRONMENT" : "staging", // environment details. staging for test environment & production for live environment
  "REQUEST_TYPE": "DEFAULT", // You would get this details from paytm after opening an account with them
  "MID": "PAYTM_MERCHANT_ID", // You would get this details from paytm after opening an account with them
  "ORDER_ID": "ORDER0000000001", // Unique ID for each transaction. This info is for you to track the transaction details
  "CUST_ID": "10000988111", // Unique ID for your customer
  "INDUSTRY_TYPE_ID": "PAYTM_INDUSTRY_TYPE_ID", // You would get this details from paytm after opening an account with them
  "CHANNEL_ID": "WAP", // You would get this details from paytm after opening an account with them
  "TXN_AMOUNT": "1", // Transaction amount that has to be collected
  "WEBSITE": "PAYTM_WEBSITE", // You would get this details from paytm after opening an account with them
  "CALLBACK_URL": "https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=ORDER0000000001", // Callback url
  "EMAIL": "[email protected]", // Email of customer
  "MOBILE_NO": "9999999999", // Mobile no of customer
  "CHECKSUMHASH": "w2QDRMgp1/BNdEnJEAPCIOmNgQvsi+BhpqijfM9KvFfRiPmGSt3Ddzw+oTaGCLneJwxFFq5mqTMwJXdQE2EzK4px2xruDqKZjHupz9yXev4="
}

CHECKSUM has to be created without "ENVIRONMENT" field info, it is only for plugin's internal use to determine which environment it's going to hit (staging/production).

In SuccessCallback method, you will get response object as json, with infromation present in http://paywithpaytm.com/developer/paytm_api_doc?target=interpreting-response-sent-by-paytm

var successCallback(response) {
    if (response.STATUS == "TXN_SUCCESS") {
        var txn_id = response.TXNID;
        var paymentmode = response.PAYMENTMODE;
        // other details and function after payment transaction
    } else {
        // error code will be available in RESPCODE
        // error list page https://docs.google.com/spreadsheets/d/1h63fSrAmEml3CYV-vBdHNErxjJjg8-YBSpNyZby6kkQ/edit#gid=2058248999
        alert("Transaction Failed for reason " + response.RESPMSG);
    }
}

var failureCallback(error) {
    // error code will be available in RESCODE
    // error list page https://docs.google.com/spreadsheets/d/1h63fSrAmEml3CYV-vBdHNErxjJjg8-YBSpNyZby6kkQ/edit#gid=2058248999
    alert("Transaction Failed for reason " + error.RESPMSG);
}

Sample response for paytm:

{
  "TXNID": "414709",
  "BANKTXNID": "",
  "ORDERID": "ORDER48886809916",
  "TXNAMOUNT": "1.00",
  "STATUS": "OPEN",
  "TXNTYPE": "SALE",
  "GATEWAYNAME": "",
  "RESPCODE": "",
  "RESPMSG": "",
  "BANKNAME": "",
  "MID": "klbGlV59135347348753",
  "PAYMENTMODE": "CC",
  "REFUNDAMT": "0.00",
  "TXNDATE": "2015-11-02 11:40:46.0"
}

References:

Note:

  • Version 0.0.10
    • Corrected the file path of config xml file in plugin.xml
  • Version 0.0.8
    • Decreased cordova support version for older apps
  • Version 0.0.7
    • Upgraded Paytm library which has fixes related to redirecting control from paytm site to mobile app
  • Version 0.0.6
    • Removed library and used gradle depencies to pull paytm library
  • Version 0.0.5
    • Updated the paytm library to v1.2.3 in android and latest (as of 6 Dec 2018 ) lib file in ios.
  • Version 0.0.3 is not backward compatibile with 0.0.2. In v0.0.3, send options as JSON object where in 0.0.2, send each value separately i.e (txn_id, customer_id, email, phone, amount, callbackurl, environment,..,..)
  • Send transaction amount in String format, as that is the format accepted in iOS platform.