@meerasolution/react-native-ms-upi-payment
Version:
Add upi payment option to your android app in react native.
43 lines (35 loc) • 1.25 kB
Markdown
`$ npm install @meerasolution/react-native-ms-upi-payment --save`<br/>
or <br/>
`$ yarn add @meerasolution/react-native-ms-upi-payment`
`$ react-native link @meerasolution/react-native-ms-upi-payment`
```javascript
import MsUpiPayment from '@meerasolution/react-native-ms-upi-payment';
async calledBtn() {
let txnId = 'MSTX' + Math.floor(Math.random() * 100000) + 1; // Transection ID
let txnRefId = 'MSTXF' + Math.floor(Math.random() * 1000) + 1; // Transection Ref ID
try {
let data = await MsUpiPayment.makePayment({
VPA: '7987060197@okbizaxis', // Required
payeeName: 'Meera Solution', // Required
txnID: txnId, // Required
txnRefId: txnRefId, // Required
payeeAmount: '1', // Required
currencyCode: 'INR', // Optional (Default 'INR')
txnNote: 'Test MS Payment', // Optional
refUrl: '', // Optional
});
console.log('payment response');
console.log(data);
} catch (e) {
console.log('Error');
Alert.alert('OOPS!', e.message);
console.log(e.message);
}
}
```
` For Any Issue mail us on kkmadhpuriya@gmail.com `