Open vishnusai14 opened 2 years ago
We are team of developer from Azu startup company and we are trying to use this module but it is giving us something like this. We are unable to figure it out the issue. Can you please help us out.
Can you please format the code a bit better, and provide an example where the issue is reproducible
import React from 'react';
import {View, Button, Alert} from 'react-native';
import RNUpiPayment from 'react-native-upi-payment';
class App extends React.Component {
successCallback = data => {
console.log(data);
};
failureCallback(data) {
Alert.alert('Payment Fail');
console.log(data);
}
init = () => {
RNUpiPayment.initializePayment(
{
vpa: xxx@okicici', //your upi address like 12345464896@okhdfcbank
payeeName: 'Google Pay Merchant', // payee name
amount: '1', //amount
transactionNote: 'Testing Upi', //note of transaction
merchantCode: '',
transactionRef: '4567887656-312-acoe-fn', //some refs to aknowledge the transaction
},
this.successCallback,
this.failureCallback,
);
};
render() {
return (
<View>
<Button
title="Pay Now"
onPress={() => {
this.init();
}}
/>
</View>
);
}
}
export default App;
How to Reproduce:
Note The same Error can be reproducible using the example code given in the github
Please can you check what versions you are running are you able to go to the intent selection screen, or you get the error on pressing pay now button. I did a fresh install was able to open intent selection screen.
I can able to open the intent selection screen and i am selecting google pay it shows the upi details as well as the amount after clicking the pay button in google pay it shows Payment declined
The upi id that you entered.. is it a merchant ID Or a personal id?
The Upi id is the business upi id only
From what i read last Business UPI ids for need to be signed by a public key key only then the payment works.. Can you try with you above code sending the payment to a friend, i.e a non business upi
Sending to personal UPI ID is not working I will try the former one
See this error is coming Vpa is merchant upi id then also And it is not blocked then why it is coming
Yes, I have signed the upi id also and add the signature as parameter but still the payment failed
See this error is coming Vpa is merchant upi id then also And it is not blocked then why it is coming
@vishnusai14 i guess this is the same issue that we got for our app.
Yes This is the same issue. Everything payment is declined with all the upi apps
I have used the business upi id and even signed it
Please help me how to fix that problem @nitish24p
I've been trying to send money to my own paytm wallet, and I get an error every time I try. Tried UPI IDs of my bank accounts as well. nothing seems to work. I've tried using different apps as methods to make the payments, but that doesnt help either. Please help
I havent had time to look at this issue, if its a pressing issue you can fork this repo and see if you're able to debug the issue / give a PR for it. Thanks
Yes, I have signed the upi id also and add the signature as parameter but still the payment failed
What process you have followed to generate signature? what libraries you have used for generating signature? react-native-sha256 and react-native-base64?
From what i read last Business UPI ids for need to be signed by a public key key only then the payment works.. Can you try with you above code sending the payment to a friend, i.e a non business upi
How to sign an UPI ID? Please help, new to this.
@nitish24p
Yes This is the same issue. Everything payment is declined with all the upi apps
I have used the business upi id and even signed it
How do we sign an UPI ID? @vishnusai14 Please help
@nitish24p were you able to solve this issue? because this issue is still coming
Facing same issue
I already have a MERCHANT UPI ID, but I'm facing the same issue with several other MERCHANT UPI IDs I've tried. Can you suggest a UPI that might work
Whenever i try to do a payment with google pay it throws me an error saying payment is declined
Code : import React from "react"; import { View, Button, Alert } from "react-native"; import RNUpiPayment from "react-native-upi-payment"; class App extends React.Component { render() { function floo() { RNUpiPayment.initializePayment( { vpa: "xxx@upiid", //your upi address like 12345464896@okhdfcbank payeeName: "xxx", // payee name amount: "1", //amount transactionNote: "Testing Upi", //note of transaction transactionRef: "aasf-332-aoei-fn", //some refs to aknowledge the transaction }, successCallback, failureCallback ); } function failureCallback(data) { console.log(data); } function successCallback(data) { console.log(data); } return (
} }
export default App;
In the console it prints {STATUS : "FAILURE"}
I am using business UPI ID Only