1.0.6 • Published 5 years ago

react-native-upi v1.0.6

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

react-native-upi

A react native module for handling payment through UPI and handling response from the UPI app.

Getting started

$ npm i react-native-upi --save

$ react-native link react-native-upi

Usage

import UPIModule from "react-native-upi";

const transactionId = "transactionId";
const message = `message`;
const payTo = "9XXXXXXXXX@upi";
const payName = "Name";
const amount = XXX;

UPIModule.openUPIClient(
  `upi://pay?pa=${payTo}&pn=${payName}&tr=${transactionId}&tn=${message}&am={amount}`
)
  .then(res => {
    if (res !== null) {
      let result = {};
      let response = res.split("&").forEach(property => {
        let temp = property.split("=");
        result[temp[0]] = temp[1];
      });
      return result;
    }
  })
  .then(res => {
    console.log(res);
  });

UPI Guidelines

To learn more about deep linking in UPI, checkout NPCI Guidelines

1.0.6

5 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago