New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-native-google-pay-tez

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-google-pay-tez

Google Pay(Tez) Native package for Merchants to accept payments for customers using react native mobile app

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

react-native-google-pay-tez - Android Only

npm

NPM

Getting started

$ npm install react-native-google-pay-tez --save

Mostly automatic installation

$ react-native link react-native-google-pay-tez

Manual installation

Android

  • Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.mahak.RNGooglePayTezPackage; to the imports at the top of the file
  • Add new RNGooglePayTezPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
    include ':react-native-google-pay-tez'
    project(':react-native-google-pay-tez').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-google-pay-tez/android')
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-google-pay-tez')
    

Request Parameters (All should be in String format only)

1. scheme - `Use 'upi' (Don't change this)`
2. authority - `Use 'pay' (Don't change this)`
3. merchantUPI - `Your verified merchant UPI though Google Pay for Business team`
4. merchantName - `Your verified merchant name though Google Pay for Business team`
4. merchantCode - `Your verified merchant code provided though Google Pay for Business team`
5. transactionId - `A unique transaction id identify . Make sure to provide unique key everytime`
6. transactionNote - `Message you want to display on Google Pay (Tez) App while transaction`
7. transactionAmount - `Transaction amount, eg "1.00" format`
8. transactionCurrency - `Use 'INR' (Don't change this)`
9. merchantURL - `Your verified merchant url through Google Pay Business team`

Response Parameters (In JSON)

1. validationError - `True in case any of validation failed, else false`
2. hasAppInstalled - `True in app is available and installed in your android device else false`
3. message - `Message for all states`
4. transactionStatus - `Transaction status after launching of Google Pay (Tez) app`
5. googlePayTezTxnId - `App transaction id provided by google`
6. responseCode - `Response code based on app actions`

Usage

import RNGooglePayTez from 'react-native-google-pay-tez';

_handleInitGooglePay = (googlePayParams) => {
    const {
        scheme,
        authority,
        merchantUPI,
        merchantName,
        merchantCode,
        transactionId,
        transactionNote,
        transactionAmount,
        transactionCurrency,
        merchantURL
    } = googlePayParams;

    // Dispatch Google Pay (Tez) Call 
    RNGooglePayTez.GooglePayInit(
        scheme,
        authority,
        merchantUPI,
        merchantName,
        merchantCode,
        transactionId,
        transactionNote,
        transactionAmount,
        transactionCurrency,
        merchantURL, (response) => { /* Transaction Response */ });
}

If you face any difficulty or having any suggestion, feel free discuss with us

Keywords

react-native

FAQs

Package last updated on 21 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts