All Projects → nitish24p → react-native-upi

nitish24p / react-native-upi

Licence: MIT license
A tiny module for Adding payments via UPI in your react native apps ❤️

Programming Languages

java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-upi

android-upi-payment
An android library for integrating payment using existing upi apps.
Stars: ✭ 26 (-36.59%)
Mutual labels:  payment, upi
nanook
Ruby library for making and receiving payments and managing a nano currency node
Stars: ✭ 17 (-58.54%)
Mutual labels:  payment
node-datachannel
Easy to use WebRTC data channels and media transport. libdatachannel node bindings.
Stars: ✭ 135 (+229.27%)
Mutual labels:  peer-to-peer
js-ipfs-mfs
[ARCHIVED] now part of the https://github.com/ipfs/js-ipfs repo
Stars: ✭ 27 (-34.15%)
Mutual labels:  peer-to-peer
The-Kademlia-Protocol-Succinctly
This is the companion repo for The Kademlia Protocol Succinctly by Marc Clifton. Published by Syncfusion.
Stars: ✭ 28 (-31.71%)
Mutual labels:  peer-to-peer
ascii-chat
A terminal-based peer-to-peer (P2P) end-to-end-encrypted (E2EE) video chat application with text messaging, written in OCaml. Supports up to 4 clients. Supports connections over internet and LAN.
Stars: ✭ 20 (-51.22%)
Mutual labels:  peer-to-peer
bitcoincashjs
WARNING: This project is no longer maintained. Please, use bitcore-lib-cash instead.
Stars: ✭ 80 (+95.12%)
Mutual labels:  payment
Card-Tray-Demo
A clone of Apple's Wallet app
Stars: ✭ 40 (-2.44%)
Mutual labels:  payment
tordam
A library for peer discovery inside the Tor network
Stars: ✭ 13 (-68.29%)
Mutual labels:  peer-to-peer
cashier
Cashier is an Elixir library that aims to be an easy to use payment gateway, whilst offering the fault tolerance and scalability benefits of being built on top of Erlang/OTP
Stars: ✭ 43 (+4.88%)
Mutual labels:  payment
angular4-paystack
💵 An angular2+ module for paystack transactions
Stars: ✭ 51 (+24.39%)
Mutual labels:  payment
go-nimona
Peer to peer networking library
Stars: ✭ 42 (+2.44%)
Mutual labels:  peer-to-peer
solo
The simplest publication tool
Stars: ✭ 34 (-17.07%)
Mutual labels:  peer-to-peer
libjuice
JUICE is a UDP Interactive Connectivity Establishment library
Stars: ✭ 197 (+380.49%)
Mutual labels:  peer-to-peer
solidus paypal braintree
💳Integrate Solidus with Braintree, including PayPal and Apple Pay support
Stars: ✭ 30 (-26.83%)
Mutual labels:  payment
adyen-python-api-library
Adyen API Library for Python
Stars: ✭ 41 (+0%)
Mutual labels:  payment
local-browser
Share your localhost in a new way (peer to peer browser)
Stars: ✭ 47 (+14.63%)
Mutual labels:  peer-to-peer
doc
The bunq API documentation
Stars: ✭ 18 (-56.1%)
Mutual labels:  payment
payjs
基于 PAYJS 微信支付个人接口开发的 Package,可直接用于生产环境
Stars: ✭ 73 (+78.05%)
Mutual labels:  payment
woocommerce-simplify-payment-gateway-plugin
WooCommerce Payment Gateway plugin from Simplify Commerce
Stars: ✭ 28 (-31.71%)
Mutual labels:  payment

react-native-upi-payment

art

react-native-upi is a tiny plugin to integrate the UPI payment interface made by NPCI from your react native apps. This plugin allows you to enable peer to peer payments via UPI in your react native apps. Linking specs have been followed as per this doc

Installation

npm install react-native-upi-payment

or

yarn add react-native-upi-payment

Android

Automatic Installation

react-native run link

Manual Installation

Open android/settings.gradle add the following

include ':react-native-upi-payment'
project(':react-native-upi-payment').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-upi-payment/android')

Open android/build.gradle add the following in the dependencies section

dependencies {
    compile project(':react-native-upi-payment')
}

Open MainApplication.java

// Other imports
import com.upi.payment.UpiPaymentPackage;

  // Add this in the Main Application Class
  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
       //... Other packages
          new UpiPaymentPackage() // <- Add this line
    );
  }

Usage

RNUpiPayment.initializePayment({
  vpa: 'john@upi', // or can be john@ybl or mobileNo@upi
  payeeName: 'John Doe',
  amount: '1',
  transactionRef: 'aasf-332-aoei-fn'
}, successCallback, failureCallback);

Config docs

{
  /*
  * REQUIRED
  * vpa is the address of the payee given to you
  * by your bank
  */
  vpa: 'somehandle@upi',

  /*
  * REQUIRED
  * payeeName is the name of the payee you want
  * to make a payment too. Some upi apps need this
  * hence it is a required field
  */
  payeeName: 'Payee name',

  /*
  * REQUIRED
  * This is a reference created by you / your server
  * which can help you identify this transaction
  * The UPI spec doesnt mandate this but its a good to have
  */
  transactionRef: 'some-hash-string',

  /*
  * REQUIRED
  * The actual amount to be transferred
  */
  amount: '200',

  /*
  * OPTIONAL
  * Transactional message to be shown in upi apps
  */
  transactionNote: 'for food'
}

Callbacks

function successCallback(data) {
  // do whatever with the data
}

function failureCallback(data) {
  // do whatever with the data
}

Responses

SUCCESS CASE

{
/**
* SUCCESS STATUS
* */
Status: "SUCCESS",
/**
* Transaction Id of bank to which upi has been initiated
* */
txnId: "AXId8c71205eb7d459889bb7018bdf2c056", 
/**
* 00 response code, for success
* transaction is successful money has been debited
* */
responseCode: "00",
/**
* Transaction reference stated in init obect
* */
txnRef: "aasf-332-aoeifn"

}

FAILURE CASES

{
  /**
   * Status Sent on transaction
   * If the user presses back or closes app
   * */
  status: "FAILURE",

  /**
  * If the user presses back or closes app
  * */
  message: "No action taken"
} // No action
{
  /**
  * FAILURE STATUS
  * */
  Status: "FAILURE",
  /**
  * Transaction Id of bank to which upi has been initiated
  * */
  txnId: "AXIa463c7ca81a24e168df5ac9c1359c38c", 
  /**
  * Non 0 response code,
  * If the user enters the wrong pin
  * */
  responseCode: "ZM",
  /**
  * Transaction reference stated in init obect
  * */
  txnRef: "aasf-332-aoeifn"
  
  }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].