drenther / upi_pay

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

IOS Upi Integration not working #41

Closed basheerbsr79 closed 2 years ago

basheerbsr79 commented 3 years ago

Have any get the ios implementation currently am getting the below error while implementing it on ios

-canOpenURL: failed for URL: "upi://pay?pa=q148166757@ybl&pn=PumQi&tr=a383c568-21a5-4ca0-9bd2-f774c80c25ee20210903210018&tn=PumQi%20Food%20Payment%20of%20Mr%2FMsMohammed%20Basheer%20PT&am=130&cu=INR&url=http%3A%2F%2Fwww.pumqi.com" - error: "This app is not allowed to query for scheme upi"

reeteshranjan commented 3 years ago

Please use the bug template and add your code sample etc. to understand your issue. Please note that all of us are volunteers and cannot put time in debugging your issue with such little information. There is a reason the bug template is provided - to help you and us the maintainers - to be able to solve things fast.

reeteshranjan commented 3 years ago

Today I looked at one of my apps that use this package. Things work fine.

The error message mentioned by you - "This app is not allowed to query for scheme upi" - occurs when you have not added the custom schemes to your app's Info.plist. The instructions on how to do that are part of README.md.

basheerbsr79 commented 2 years ago

Hi

LSApplicationQueriesSchemes
<array>
    <string>gpay</string>
    <string>paytm</string>
    <string>phonepe</string>
    <string>com.amazon.mobile.shopping</string>
</array>

this the array i added in info.plist

  final UpiTransactionResponse response = await UpiPay.initiateTransaction(
  amount: double.parse(netAmounts).toString(),
  app: appMeta.upiApplication,
  receiverName: 'PumQi',
  receiverUpiAddress: payUpiId,
  transactionRef: tempOrderId,
  transactionNote: 'PumQi Food Payment of Mr/Ms' + username,
  url: 'http://www.pumqi.com'
);

this is the method iam using but iam tried with gpay ,phone pe paytm , and amazon pay but no one will work

Currently the android version also not working

showing security reason while doing the transaction

attaching the screen shot currently getting error in android using phone pe

WhatsApp Image 2021-09-14 at 10 03 39 AM

reeteshranjan commented 2 years ago

For IOS: you need to have the custom scheme upi to be able to transact. Other custom schemes like paytm only help the package to detect them on iOS. For more, see https://github.com/drenther/upi_pay#ios-configuration.

For Android: for the security issue, please see the README section https://github.com/drenther/upi_pay#upi-apps-functional-status-dynamics and https://github.com/drenther/upi_pay/issues/38

drenther commented 2 years ago

Closing this issue since the scenarios are already documented in the README of the repo. Thanks @reeteshranjan for pointing it out.

reeteshranjan commented 2 years ago

Is https://github.com/drenther/upi_pay/issues/38 relevant and important for you?

If yes, could you please respond to my twitter thread with UPI and NPCI handles included in your response asking how these must be solved and how it helps you? https://twitter.com/reeteshr08/status/1488746633068089345

@basheerbsr79