drenther / upi_pay

Flutter plugin for UPI (Only in India)
MIT License
60 stars 71 forks source link

Support for other UPI apps #15

Closed reeteshranjan closed 3 years ago

reeteshranjan commented 4 years ago

For my project, I have been working on supporting several other apps available on at least Android today. For several apps it has been straight forward to support them after discovering their package names as returned by OS. I've 20+ apps (beyond those currently supported by upi_pay) supported in my version (not yet committed to my fork as I am continuing testing).

One major fundamental change that came out of this experimentation is that some apps do not like the URL encoding of pa. For example, for a given pa with value abc@upi, it gets encoded as abc%40upi and some of the apps extracted it as abc 40upi (space comes in for %) resulting in a failed transaction workflow. I changed the URI building to not use encoding for at least the pa parameter. It's a decision that works for me as I can handle my own client code and maintaining it is possible.

The question I have for the main developers is: is this project looking to integrate such work? If so, I'll create pull requests.

reeteshranjan commented 4 years ago

Submitting summary of my experiments of trying to extend the library for various UPI apps on Android.

Working Apps (19)

Apps that properly integrate to the point of sending back usable transaction data.

Amazon Pay, Axis Pay, BHIM Baroda Pay, BHIM, BHIM Cent UPI (Central Bank of India), Cointab, BHIM DCB UPI, Google Pay, iMobile, IndusPay, MahaUPI (Maharashtra Bank), Mobikwik, BHIM Oriental Pay, PayTM, Paywiz, Phone Pe, BHIM PSB, BHIM SBI Pay, Yes Pay

Did not work for me apps (10)

Apps that either do not understand the calls, or do not seem to support intents, or have unstable functionality, or do not send back usable transaction data post debit, or do not respond at all post debit.

Airtel Pay, IDFC UPI, IndianBank UPI, KBL UPI, KVB Pay, LVB Upaay, Mi Pay, RBL UPI, SyndUPI, UCO UPI

Heading towards rejected/Under trial (8):

These seemed to exhibit what one would think as temporary issues and would be tested further again. Issues range from not getting the SMS authentication going to payment not getting through.

Bandhan Bank, BOI UPI, CORP UPI, CSB Pay, Freecharge, Truecaller, UltraCash, Vijaya UPI

reeteshranjan commented 4 years ago

I completed the above study to end up with this:

Working Apps (21)

Amazon Pay, Axis Pay, BHIM Baroda Pay, BHIM, BHIM Cent UPI (Central Bank of India), Cointab, BHIM CORP UPI, BHIM DCB UPI, Freecharge, Google Pay, iMobile, IndusPay, MahaUPI (Maharashtra Bank), Mobikwik, BHIM Oriental Pay, PayTM, Paywiz, Phone Pe, BHIM PSB, BHIM SBI Pay, Yes Pay

Did not work for me apps (16)

Airtel Pay (#16 ), Bandhan Bank, BOI UPI (Bank of India), CSB Pay, IDFC UPI, IndianBank UPI, KBL UPI, KVB Pay, LVB Upaay, Mi Pay (#14 ), RBL UPI, SyndUPI, Truecaller (it's been persistently failing to do the SMS verification for me), UCO UPI, UltraCash, Vijaya UPI

There may be more apps on Play Store; but these are the ones that showed up when searching for BHIM/UPI.

drenther commented 4 years ago

Hey, thanks for the extensive details in the issue. And apologies for replying late. I would say let's take it one step at a time and maybe go for the 21 working apps initially only. What do you guys think? @reeteshranjan @pepsighan

drenther commented 4 years ago

The problem with that is removal of Airtel Pay app, which is a breaking change.

reeteshranjan commented 4 years ago

The problem with that is removal of Airtel Pay app, which is a breaking change.

Please do verify for yourself. More devices we could test and keep the supported list current, it would be something worthy of eyes-closed integration.

reeteshranjan commented 4 years ago

Just adding some official sorta list of who are supposed to be recognised apps/partners:

https://www.upichalega.com/upi-partners.php https://www.npci.org.in/upi-PSP&3rdpartyApps https://www.npci.org.in/upi-live-members https://www.sebi.gov.in/sebiweb/other/OtherAction.do?doRecognisedFpi=yes&intmId=43

pepsighan commented 4 years ago

@drenther Yeah, we can go incrementally with what is working best and any breaking change can be postponed for a major version when things settle down.

reeteshranjan commented 4 years ago

In the following comments I am documenting the detailed report on testing of all apps that will help reviewing the pull request I'm going to create

reeteshranjan commented 4 years ago

New apps working on Android

Criteria for being termed as working

List of New Apps passing the criteria

  1. ALLBANK (Allahabad Bank)
  2. BHIM Baroda Pay
  3. BHIM Cent UPI
  4. BHIM CORP UPI
  5. BHIM DCB UPI
  6. BHIM IndusPay UPI
  7. BHIM Oriental Pay
  8. Bhim Paywiz v2
  9. BHIM PSB
  10. BHIM Yes Pay
  11. BPay
  12. Cointab
  13. Freecharge
  14. iMobile (Was not listed in valid applications)
  15. KhaaliJeb
  16. MahaUPI
  17. Mobikwik
reeteshranjan commented 4 years ago

New apps that get setup on Android but fail during/post Intent invoked launch

Criteria

Retention towards further testing

The code that detects these apps' package names is retained for avoiding repetitive work around recognising these apps and allowing further testing on other devices before ruling them out.

These are commented out while being retained in the list of valid apps in the commit for the upcoming pull request, so it's straightforward to enable them back and test further.

List of these apps

  1. BHIM AuPay: Sends back empty values for transaction ID and approval Ref in response after payment goes through
  2. BHIM Bandhan UPI: While trying to pay says "something went wrong" and this error persists across retries
  3. BHIM CSB-UPI: Hangs indefinitely on its opening view when launched
  4. BHIM IndianBank UPI: Payment functionality does not work stably and errors out in unpredictable manner
  5. BHIM JetPay: Intent invocation raises a java.lang.SecurityException: Permission Denial exception
  6. BHIM KBL UPI: Says "mandatory values are missing" when launched, for every try made
  7. BHIM KVB UPI: Does not show a pre-filled payment form when launched
  8. BHIM LVB Upaay: Payment succeeds but does not return to the caller app
  9. BHIM RBL Pay: Keeps trying to log in in a loop when launched
  10. BHIM UCO UPI: Says "mandatory values are missing" when launched, for every try made
  11. BHIM@Synd UPI: While making payment give a functional error and payment does not succeed, for each try made
  12. Canara Bank App (CANDI): Payment fails with "Transaction Failed" error, for each try made (possibly some issue with me moving my SIM card around where most apps re-verify the SIM but Canara bank app doesn't and possibly fails due to this)
  13. HSBC Simply Pay: Sends back null/NA as values for transaction ID and approval Ref in response after payment goes through
  14. UltraCash: Says "transaction canceled" for each try made
reeteshranjan commented 4 years ago

New apps that show up as UPI apps in discovery but do not get setup

Criteria

Retention towards further testing

The code that detects these apps' package names is retained for avoiding repetitive work around recognising these apps and allowing further testing on other devices before ruling them out.

These are commented out while being retained in the list of valid apps in the commit for the upcoming pull request, so it's straightforward to enable them back and test further.

List of these apps

  1. BHIM BOI UPI: Mobile number verification fails, for all tries made
  2. BHIM Equitas UPI: Mobile number verification fails, for all tries made
  3. BHIM Vijaya UPI App: Mobile number verification fails, for all tries made
  4. PayZapp: Mobile number verification fails, for all tries made
  5. Realme PaySa: Mobile number verification fails, for all tries made
reeteshranjan commented 4 years ago

Apps not included in code

Reason of not including

These apps are mentioned in the various lists in the links shared earlier. However; they are not included in code for various reasons listed below, and are captured here so anyone else can see if they have a workaround/solution for the reasons mentioned and test them towards integrating.

List of these apps

  1. BHIM IDFC FIRST Bank UPI App: supports only merchants (could not test as I am not one)
  2. BHIM LOTZA MERCHANT App: supports only merchants (could not test as I am not one)
  3. BHIM PNB: only for Union Bank of India/Oriental Bank of Commerce customers
  4. BHIM United UPI Pay: only for Union Bank of India/Oriental Bank of Commerce customers
  5. CUB mBank Plus: only for CUB customers
  6. DBS India: only for DBS customers
  7. Kotak Bank App: only for Kotak bank customers
  8. OMEGAPAY: does not register itself as an UPI app (at least on my Android 8 device)
  9. SIB UPI-POS: only for South Indian Bank customers
reeteshranjan commented 4 years ago

Please wait for another commit tomorrow before reviewing this pull request. @drenther @pepsighan

reeteshranjan commented 4 years ago

I have completed my commits on this one. @drenther @pepsighan

reeteshranjan commented 4 years ago

In their latest release, Jio has added support for UPI payment. Did not test it out yet on Android. Adding here for tracking.

reeteshranjan commented 3 years ago

Please see and review https://github.com/drenther/upi_pay/pull/17.

reeteshranjan commented 3 years ago

See https://github.com/reeteshranjan/upi_pay/blob/master/APPS.md for latest verification status of a number of apps across android and ios.

drenther commented 3 years ago

A whole plethora of apps are being supported now since the merge of #17

The updated list available here - APPS.md