In react native app I am trying to use one-react-native-upi so that user can pay using UPI app. Below is how I am trying to use
const onSucess = () => {
console.log('Success:');
};
const onFailure = (e: any) => {
console.log('Failure:', e);
};
const payNow = () => {
OneUpi.initiate(
{
upiId: 'xxxx@upiID',
name: 'xxxx',
note: 'Deposit',
amount: '10',
targetPackage: 'com.google.android.apps.nbu.paisa.user',
},
onSucess, //<--Error: Argument of type '() => void' is not assignable to parameter of type '() => success'. Type 'void' is not assignable to type 'success'.ts(2345)
onFailure,
);
};
In above code I am getting error. I am not sure how to fix it, and also when payNow
is called I am getting failure response:
Failure: {"message": "No Action Taken", "status": "FAILED"}
I am stuck on this since last few days, and not sure how to fix the issues