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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-fcpaytm

v1.0.0

Published

Installation ============

Downloads

1

Readme

Installation

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

Supported Platform

Android iOS

Usage

Add below line to declaration.d.ts file

declare var paytm : any;
paytm.startPayment(options, successCallback, failureCallback);

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);
}

Expected "Options" that has to be send to the plugin to start the transactions is

{
  "REQUEST_TYPE": "DEFAULT",
  "MID": "PAYTM_MERCHANT_ID",
  "ORDER_ID": "ORDER0000000001",
  "CUST_ID": "10000988111",
  "INDUSTRY_TYPE_ID": "PAYTM_INDUSTRY_TYPE_ID",
  "CHANNEL_ID": "WAP",
  "TXN_AMOUNT": "1",
  "WEBSITE": "PAYTM_WEBSITE",
  "CALLBACK_URL": "https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=ORDER0000000001",
  "EMAIL": "[email protected]",
  "MOBILE_NO": "9999999999",
  "CHECKSUMHASH": "w2QDRMgp1/BNdEnJEAPCIOmNgQvsi+BhpqijfM9KvFfRiPmGSt3Ddzw+oTaGCLneJwxFFq5mqTMwJXdQE2EzK4px2xruDqKZjHupz9yXev4="
}

Response:

{
  "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"
}

CHECKSUM has to be created without "ENVIRONMENT" field, it is for plugin's internal use to determine which environment it's going to hit.

References: Various fields avialbale in "options" Doc on response from the plugin Logic to generate checksum Paytm guys suggests to verify the transaction status manually after the successful transaction. Refer this link to know about it

Note:

  • 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,..,..)
  • ENVIRONMENT info has to be part of 'options', which says the environment transaction has to be started. Possible values are 'staging' and 'production'.
  • Send transaction amount in String format, as that is the format accepted in iOS platform.