react-native-payabbhi
v1.0.0
Published
React Native plugin for using Payabbhi native SDKs (Android & iOS)
Downloads
4
Readme
react-native-payabbhi
React Native plugin for using Payabbhi native SDKs (Android & iOS)
Installation
$ npm i react-native-payabbhi --save
$ react-native link react-native-payabbhi
Usage
Import PayabbhiCheckout module to your component:
import PayabbhiCheckout from 'react-native-payabbhi';
Call
PayabbhiCheckout.open
method with the argumentoptions
. This method will return aJS Promise
wherethen
part corresponds to a successful payment and thecatch
part corresponds to payment failure.<TouchableHighlight onPress={() => { var options = { access_id: "<access_id>", order_id: "<order_id>", amount: <amount>, description: "<description>", prefill: { name: "<name>", email: "<email>", contact: "<contact>" }, notes: { merchant_order_id: "<merchant_order_id>" } }; PayabbhiCheckout.open(options).then((data) => { alert(`Success: ${data.order_id} | ${data.payment_id}`); }).catch((error) => { alert(`Error: ${error.code} | ${error.message}`); }); }}> <Text style = {styles.text}>PAY</Text> </TouchableHighlight>