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

react-native-paytm-customui-sdk

v1.1.9

Published

This library is a react native implementation of Paytm's custom-ui SDK android/ios. For more information you can visit https://developer.paytm.com/docs/custom-ui-sdk. Current version works for Android only. Will support ios integration very soon.

Downloads

4

Readme

react-native-paytm-customui-sdk

This library is a react native implementation of Paytm's custom-ui SDK android/ios. For more information you can visit https://developer.paytm.com/docs/custom-ui-sdk. Current version works for Android only. Will support ios integration very soon.

Getting started

$ npm install react-native-paytm-customui-sdk --save

Mostly automatic installation

$ react-native link react-native-paytm-customui-sdk

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-paytm-customui-sdk and add RNPaytmCustomuiSdk.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNPaytmCustomuiSdk.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)

Android

For react >= 16.0 auto linking is supported, for react < 16.0 use custom linking #####Custom linking

  1. Open up android/app/src/main/java/[...]/MainActivity.java

    • Add import com.reactlibrary.RNPaytmCustomuiSdkPackage; to the imports at the top of the file
    • Add new RNPaytmCustomuiSdkPackage() to the list returned by the getPackages() method
  2. Append the following lines to android/settings.gradle:

    include ':react-native-paytm-customui-sdk'
    project(':react-native-paytm-customui-sdk').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-paytm-customui-sdk/android')
  3. Insert the following lines inside the dependencies block in android/app/build.gradle:

      compile project(':react-native-paytm-customui-sdk')
  4. Open up android/app/src/main/java/[...]/MainApplication.java

  • Add import net.one97.paytm.nativesdk.PaytmSDK; to the imports at the top of the file
  • Add PaytmSDK.init(this); at the end of onCreate() method.

Usage

import PaytmCustomuiSdk from 'react-native-paytm-customui-sdk';

##API

All the APIs return promise. Please go to https://developer.paytm.com/docs/custom-ui-sdk for more information about different function and parameter information.

####checkPaytmInstalled() Checks if the Paytm App is installed on the device.

####Example

PaytmCustomuiSdk.isPaytmAppInstalled().then(paytmInstalled => {
    // your logic
});

####fetchAuthCode() Fetch auth code for Paytm.

  1. Input Params:
    • clientId - String - provided by Paytm
  2. Returns authCode as string.

####Example

PaytmCustomuiSdk.fetchAuthCode(clientId).then(authCode => {
    // returns authCode as a string
});

####getUPIAppsInstalled() Gets the list of UPI apps installed on the device.

  1. Input Params:
    • clientId - String - provided by Paytm
  2. Returns list of UPI app names as string.

####Example

PaytmCustomuiSdk.getUPIAppsInstalled().then(apps => {
    // returns list of app names ex.['Paytm', 'GooglePay'] as string. parse it to JSON
    const appNames = JSON.parse(apps);
});

####startUPIIntentTransaction(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, paymentFlow, appName) Start paytm via Paytm UPI intent flow

  1. Input Params:
    • mid - String - provided by Paytm
    • orderId - String
    • txnToken - String - received from initiate transaction API response via server
    • amount - float
    • isAssistEnabled - boolean
    • loggingEnabled - boolean
    • customEndpoint - String - provided by paytm,
    • merchantCallbackUrl - String - optional in case you want txn result to be sent to server
    • paymentFlow - String - It’s value can be NONE,HYBRID,ADDNPAY
    • selectedAppName - any one value selected from app list you get it by calling getUPIAppsInstalled()
  2. Returns TransactionInfo object data as string.

####Example

PaytmCustomuiSdk.startUPIIntentTransaction(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, paymentFlow, selectedAppName).then(txnInfo => {
    // returns TransactionInfo object data
}).catch(err=>{
    
});

#####Sample TransactionInfo data:

{
    "ORDERID": "PARCEL15816826759",
    "MID": "AliSub58582630351896",
    "TXNID": "20200214111212800110168052313701129",
    "TXNAMOUNT": "1.00",
    "PAYMENTMODE": "CC",
    "CURRENCY": "INR",
    "TXNDATE": "2020-02-14 17:48:13.0",
    "STATUS": "TXN_SUCCESS",
    "RESPCODE": "01",
    "RESPMSG": "Txn Success",
    "MERC_UNQ_REF": "test4",
    "UDF_1": "test1",
    "UDF_2": "test2",
    "UDF_3": "test3",
    "ADDITIONAL_INFO": "test5",
    "GATEWAYNAME": "ICICIPAY",
    "BANKTXNID": "68568621250",
    "BANKNAME": "HSBC",
    "PROMO_CAMP_ID": "PROMO CODE",
    "PROMO_RESPCODE": "702",
    "PROMO_STATUS": "FAILURE"
}

####startWalletTransaction(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, paymentFlow) Start Paytm wallet transaction

  1. Input Params:
    • mid - String - provided by Paytm
    • orderId - String
    • txnToken - String - received from initiate transaction API response via server
    • amount - float
    • isAssistEnabled - boolean
    • loggingEnabled - boolean
    • customEndpoint - String - provided by paytm,
    • merchantCallbackUrl - String - optional in case you want txn result to be sent to server
    • paymentFlow - String - It’s value can be NONE,HYBRID,ADDNPAY
  2. Returns TransactionInfo object data as string.

####Example

PaytmCustomuiSdk.startWalletTransaction(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, paymentFlow).then(txnInfo => {
    // returns TransactionInfo object data
    
}).catch(err=>{
    
});

#####Sample TransactionInfo data:

{
    "ORDERID": "PARCEL15816826759",
    "MID": "AliSub58582630351896",
    "TXNID": "20200214111212800110168052313701129",
    "TXNAMOUNT": "1.00",
    "PAYMENTMODE": "CC",
    "CURRENCY": "INR",
    "TXNDATE": "2020-02-14 17:48:13.0",
    "STATUS": "TXN_SUCCESS",
    "RESPCODE": "01",
    "RESPMSG": "Txn Success",
    "MERC_UNQ_REF": "test4",
    "UDF_1": "test1",
    "UDF_2": "test2",
    "UDF_3": "test3",
    "ADDITIONAL_INFO": "test5",
    "GATEWAYNAME": "ICICIPAY",
    "BANKTXNID": "68568621250",
    "BANKNAME": "HSBC",
    "PROMO_CAMP_ID": "PROMO CODE",
    "PROMO_RESPCODE": "702",
    "PROMO_STATUS": "FAILURE"
}

####fetchUPIBalance(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, vpa, bankAccountString) Start Paytm wallet transaction

  1. Input Params:
    • mid - String - provided by Paytm
    • orderId - String
    • txnToken - String - received from initiate transaction API response via server
    • amount - float
    • isAssistEnabled - boolean
    • loggingEnabled - boolean
    • customEndpoint - String - provided by paytm,
    • merchantCallbackUrl - String - optional in case you want txn result to be sent to server
    • vpa - String - Virtual Payment Adress(eg.xyz@paytm)
    • bankAccountString - String - JSON string representing a bank account for upi
  2. Returns TransactionInfo object data as string.

####Example

PaytmCustomuiSdk.startWalletTransaction(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, vpa, bankAccountString).then(balanceInfo => {
    // returns balance information
    
}).catch(err=>{
    
});

####setUpiMpin(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, vpa, bankAccountString) Start Paytm wallet transaction

  1. Input Params:
    • mid - String - provided by Paytm
    • orderId - String
    • txnToken - String - received from initiate transaction API response via server
    • amount - float
    • isAssistEnabled - boolean
    • loggingEnabled - boolean
    • customEndpoint - String - provided by paytm,
    • merchantCallbackUrl - String - optional in case you want txn result to be sent to server
    • vpa - String - Virtual Payment Adress(eg.xyz@paytm)
    • bankAccountString - String - JSON string representing a bank account for upi
  2. Returns TransactionInfo object data as string.

####Example

PaytmCustomuiSdk.startWalletTransaction(mid, orderId, txnToken, amount, isAssistEnabled, loggingEnabled, customEndpoint, merchantCallbackUrl, vpa, bankAccountString).then(status => {
    // returns transaction status
    
}).catch(err=>{
    
});