Git Product home page Git Product logo

cordovapaytm's Introduction

CordovaPayTM

Supporting platform

Platform OS level
Android Android 4.0+
iOS iOS 7.0+

This plugin was based on this Apache project and has a compatible API.

Installation

// you may also install directly from this repo

cordova plugin add https://github.com/isathyam/CordovaPayTM.git --variable GENERATE_URL=<Checksum Generation URL> --variable VERIFY_URL=<Checksum Validation Url> --variable MERCHANT_ID=<MerchantID> --variable INDUSTRY_TYPE_ID=<IndustryType> --variable WEBSITE=<WAPWebsiteName>

This plugin has only been tested in Cordova 3.2 or greater, and its use in previous Cordova versions is not recommended (potential conflict with keyboard customization code present in the core in previous Cordova versions).

If you do use this plugin in an older Cordova version (again, not recommended), you have to make sure the HideKeyboardFormAccessoryBar and KeyboardShrinksView preference values are always false, and only use the API functions to turn things on/off.

Usage

window.plugins.paytm.startPayment(txn_id, customer_id, email, phone, amount, method, successCallback, failureCallback);

Methods

  • staging support Pass "staging" for Staging(Testing support)

  • live support Pass "product" for Live Product(Live support or before releasing app)

Example

//Example

    window.plugins.paytm.startPayment(txn_id, customer_id, "[email protected]" ,"******9055", "10", "staging", successCallback, failureCallback);
          function successCallback(response) {
          //staging (or) product 
            var transactionBankTxnId = response.MID;
            var transactionMId = response.ORDERID;
            var transactionOrderId = response.TXNID;
            var transactionTxnDate = response.TXNDATE;
            var transactionTxnId = response.BANKTXNID;

            alert(JSON.stringify(response));
            console.log("Payed Successfully");
        }

        function failureCallback(message) {
            alert('Failed because: ' + message);
            console.log('Failed because: ' + message);
        }

Credits

It was originally created by samyam-a, and i have updated callback success response, error response with code, staging(testing) and live support.

Issues or New enhancements

Feel free ask ask questions n even i love new request..

cordovapaytm's People

Contributors

iamisathya avatar sagarkul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.