0

I'm developing an app with React Native. I'm trying to implement payment using UPI, but I have a problem. I'm using react-native-upi-payment and the code is like below.

    const init = () => {
      try {
        RNUpiPayment.initializePayment(
          {
            vpa: 'upi_id@ybl',
            payeeName: 'my payee name',
            amount: '1',
            transactionRef: 'aasf-332-aoei-fn',
            transactionNote: 'for food',
          },
          successCallback,
          failureCallback,
        );
      } catch (e) {
        console.error('Error query BasketMenus:', e);
      }
    };

    function successCallback(data) {
      // do whatever with the data
      console.log('success', data);
    }

    function failureCallback(data) {
      // do whatever with the data
      console.log('error', data);
    }

I tested it on 2 physical androids.(1st: LG V40 - android 10. 2nd: redmi note12 - MIUI 14.02, android 13) On the first phone, when I called the init function, it showed an area at the bottom of the screen to select an app, but it said there is no app available to perform the action. On the second phone, it switched to the app selection screen and then immediately called the failureCallback. The message is "No action taken". Again, this is due to the lack of an app list. Both devices have paytm, phonepe, gpay installed.

Why aren't my installed UPI apps listed?

I don't have a bank account so I'm only signed up for the UPI apps with my phone number, is this a problem? Or is there something else going on? Thank you for your help.

Koreahn
  • 1
  • 2

0 Answers0