Giter Club home page Giter Club logo

upi_pay's Introduction

upi_pay

version

Find installed UPI payment apps on your phone and make payments using any one of them.

Package implements UPI Deep Linking And Proximity Integration Specification.

Android iOS
Android Screen Capture IOS Screen Capture

Getting Started

Add this package to your flutter project's pubspec.yaml as a dependency as follows:

dependencies:
  ...
  upi_pay: ^1.0.1

Import the package as follows:

import 'package:upi_pay/upi_pay.dart';

iOS configuration

In Runner/Info.plist add or modify the LSApplicationQueriesSchemes key so it includes custom query schemes shown as follows:

  <key>LSApplicationQueriesSchemes</key>
  <array>
    ...
    <string>freecharge</string>
    <string>gpay</string>
    <string>in.fampay.app</string>
    <string>lotza</string>
    <string>mobikwik</string>
    <string>paytm</string>
    <string>phonepe</string>
    <string>upi</string>
    <string>upibillpay</string>
    <string>whatsapp</string>
    ...
  </array>

Usage

Get list of installed apps

final List<ApplicationMeta> appMetaList = await UpiPay.getInstalledUpiApps();

Show an app's details

Widget appWidget(ApplicationMeta appMeta) {
  return Column(
    mainAxisAlignment: MainAxisAlignment.center,
    children: <Widget>[
      appMeta.iconImage(48), // Logo
      Container(
        margin: EdgeInsets.only(top: 4),
        alignment: Alignment.center,
        child: Text(
          appMeta.application.getAppName(),
          textAlign: TextAlign.center,
        ),
      ),
    ],
  );
}

Do a UPI transaction

Future doUpiTransation(ApplicationMeta appMeta) {
  final UpiTransactionResponse response = await UpiPay.initiateTransaction(
    amount: '100.00',
    app: appMeta.application,
    receiverName: 'John Doe',
    receiverUpiAddress: 'john@doe',
    transactionRef: 'UPITXREF0001',
    transactionNote: 'A UPI Transaction',
  );
  print(response.status);
}

Behaviour, Limitations & Measures

Android

Flow

  • On Android, the UPI Deep Linking And Proximity Integration Specification is implemented using Intents.
  • An Intent call with transaction request parameters includes the specific UPI app to be invoked.
  • Post the UPI transaction being processed by the chosen Android UPI app, it returns a response as per the format defined in the specification to the package's Android plugin layer.
  • The plugin layer parses this response to create a UpiTransactionResponse object that is returned to your calling code. This object clearly indicates the status of the UPI payment, i.e. was it successful, failed or being processed.

Measures

It is advised that you implement a server-side payment verification on top of this status reporting, to avoid being affected by any hacks in the UPI transaction workflow on client's phone.

iOS

Flow

  • On iOS, the UPI Deep Linking And Proximity Integration Specification is implemented using iOS custom schemes.
  • Each UPI payment app can listen to a payment request of the form upi://pay?... sent by a caller app to iOS.
  • The specification does not let you specify the target app's identifier in this request. On iOS, there is no other disambiguation measure available such as any ordering of the UPI payment apps that can be retrieved using any iOS APIs. Hence, it's impossible to know which UPI payment app will be invoked.
  • One of the applicable apps gets invoked and it processes the payment. The custom schemes mechanism has no way to return a transaction status to your calling code. The calling code can only know if a UPI payment app was launched successfully or not.

How does the package then implement getInstalledUpiApps?

The apps that implement any other unique custom scheme other than upi are discovered using such custom schemes. In the list of returned apps, both the reliably discovered apps and the supported but undetectable apps are returned.

Your code can distinguish if an app in the list of discovered apps was detected or not by checking as follows:

bool isAppReallyDiscovered(ApplicationMeta applicationMeta) {
  return applicationMeta.application.discoveryCustomScheme != null
}

Measures

  • You will have to implement a payment verification on top of functionality available through this package.
  • You should distinguish discovered and supported-only apps using the mechanism in the above section. The example app can be used for reference.

UPI Apps' Functional Status Dynamics

UPI standards and systems are evolving, and accordingly behaviour and functionality of the UPI payment apps are changing. See Apps for details of current functional status of various applications that were verified by us.

Support for merchant and non-merchant payments

The UPI Deep Linking And Proximity Integration Specification is designed for merchant payments. It includes parameters in payment request that can be provided only if the payment was made to a merchant e.g. the merchant code (mc parameter), and a signature (crypto-hash) of the request created using merchant's private key.

However; various applications have been accepting requests without merchant details and signature and successfully processing payments. Possibly, the dilution could be due to the reason that such a package can only automate filling a payment form, and unless the user verifies the details in the form and enters the UPI pin, no damaging payments can be really made.

Over last few months, few applications have started changing their behaviour around non-merchant payments and one or more of the following are seen in few apps:

  • An implicit "unverified source" warning or a direct warning indicating that merchant data in the request is not correct
  • Z7 error, "Transaction Frequency Limit Exceeded": See UPI Error and Response Codes
  • U16 error, "Risk Threshold Exceeded", see UPI Error and Response Codes
  • An implicit "Security error"

This behaviour sometimes is not consistent even for the same app. For example, WhatsApp successfully completes transactions on iOS; but rejects non-merchant transactions on Android.

If you believe that your app's users' money is secure via their UPI pin, and you can let them use apps that successfully complete non-merchant transactions, then go ahead and pick the working apps in Apps and integrate this package.

Regressions

It's seen that post the Bank mergers of 2020-21 some of the bank apps have stopped working, even though they are still in Play Store and/or App Store.

iOS minimum versions

Several BHIM apps have stopped working on <iOS 13.5. This package's iOS support is verified on iPhone with iOS 14+.

Love to experiment yourself?

Default behaviour of the getInstalledUpiApps API is to give you only the completely successfully working UPI apps. You can make the package return other apps by passing relevant values for parameters of this API. Please see API documentation. To support this experimentation, we would add further tweaking to allow you to access UPI apps not seen and supported by this package shortly on Android.

Contributors ✨

Thanks to these wonderful people (emoji key):


Soumyajit Pathak

πŸ’» πŸ€” πŸ‘€ πŸ“– 🚧 πŸ”¬

Reetesh Ranjan

πŸ’» πŸ€” πŸ‘€ πŸ“– 🚧 πŸ”¬

Sharad Chand

πŸ’» πŸ€” πŸ”¬

Adam Markon

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome and will be recognised!

Other related solutions

  • upi_india (repo) - Another solid flutter package for payment gateway free UPI integration. We often share issues faced / solution approaches and more. Go check them out as well!

upi_pay's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

upi_pay's Issues

Using old version of universal_io library

This is not an issue but as you are using old version of universal_io, it is getting incompatible with cryptography ^2.0.1. Although cryptography is not part of this library but most of the flutter apps uses this to support GCM encryption. If you update the universal_io to version 2.0.4 it will get resolved.

Merchant payments (and potentially avoid issues seen with major payment apps)

Is your feature request related to a problem? Please describe.

  1. Merchant payments: UPI deep linking specification, implemented by this package, is for merchant payments by design though individual to individual payments are supported by several apps on an ad-hoc basis. Work on this feature will add merchant payment support.
  2. Security warning/errors on major apps: Discussion with Bank of Baroda UPI team reveals that several major payment apps are looking to avoid fraud on UPI by doing a strict check on authenticity of payments. This makes these issues appear more related to the lack of merchant signature in current version of the package. This is further seen in the following snippet from the UPI deep linking specification which is about how a UPI payment app should verify a UPI deep linking request (the ones made through this package)

Screenshot 2021-07-09 at 5 14 47 PM

Describe the solution you'd like

  1. Mechanism in which users can create merchant signature themselves:
    1. Provide an API that would generate the UPI transaction request in the format specified in point 3 in section 1.3 of UPI deep linking specification towards signing by a package user app using their merchant private key.
    2. Provide an API that would accept the UPI transaction data and the signature created and will perform the UPI transaction
  2. Provide an API that implements signing using the algorithm described in point 3 in section 1.3 (RSA512 and SHA256) for users that are OK with providing their private key and then performs the UPI transaction.

The API changes/additions should retain backward compatibility for non-merchant payments.

Describe alternatives you've considered

This aspect of the UPI deep linking specification has no alternatives.

Any example solutions

This feature is research based and is an attempt to implement part of the UPI deep linking specification not yet implemented. There is no example solution known.

Additional context

None

Not able to open any UPI in IOS.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Enter VPA
  2. Trigger payment
  3. Go to opened UPI app
  4. ...

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environmental Details

  • OS: [e.g. Android 11]
  • Device: [e.g. OnePlus Nord]
  • Package Version: [e.g. v1.0.0]
  • UPI Applications in the device: [e.g. - GPay, Paytm]
  • Play Store: [e.g. Google, Mi, Vivo]
  • Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context

Add any other context about the problem here.
@reeteshranjan Hello, I have look into this plug in as i mentioned above some UPIs not showing because in device no-one UPI app was registered with account, Issue was solved but In IOS not able to open any UPI apps, Can you please help ?

Android v2 embedded migration

i was trying to install this package but i got suggestion to migrate this package into android v2

Docs for migration:

https://flutter.dev/go/android-plugin-migration

Error: -

The plugin upi_pay uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

update your upi_pay dependency please

update your upi_pay dependency please.
it is showing android embidded issue v2 depreceted after i update android studio flutter plugin you can see audio_service plugin that is working with new update

Cannot get all UPI apps in list of Installed Apps

I currently have Google Pay, PhonePe, PayTM and Truecaller insalled on my phone,
But when I invoke UpiPay.getInstalledUpiApplications(), I only get 2 in the list of installed apps: Google Pay and True Caller.
Am I missing something?

Mismatch txnId

Payment everything working properly but after the payment txnId(Transaction ID) is a mismatch. eg:- actual txnId is 201785931600 but get txnId is 0BE87358021B8B7939126F17997B08D9. Why does it show like this?

Unable to use because of Decimal 2.0

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Enter VPA
  2. Trigger payment
  3. Go to opened UPI app
  4. ...

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environmental Details

  • OS: [e.g. Android 11]
  • Device: [e.g. OnePlus Nord]
  • Package Version: [e.g. v1.0.0]
  • UPI Applications in the device: [e.g. - GPay, Paytm]
  • Play Store: [e.g. Google, Mi, Vivo]
  • Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context

Add any other context about the problem here.

UPI payment validate with transaction refreance no

Hi There,

I would like to know how we can double sure the transaction by calling the transaction details with the response transaction-id

like I was looking for a solution that can be verified on the server side just after the payment success. any help will be highly appreciated

I know there might be some service under the NPCI a BHEM UPI but I am not sure about where we will get the correct response for consuming this service

All UPI apps are failing

The Problem
No matter what UPI app I trigger, it just says, "Maximum limit exceeded...." and the transaction just got failed.
NO ERROR MESSAGE IS LOGGING

Just to cross-check I manually went to GPay & Paytm app to transfer money. It was successful.

No response after transaction is completed when used with razorpay_flutter

`final UpiTransactionResponse a = await UpiPay.initiateTransaction(
      amount: _amountController.text,
      app: app.upiApplication,
      receiverName: 'test',
      receiverUpiAddress: _upiAddressController.text,
      transactionRef: transactionRef,
      merchantCode: '7372',
    );

    print('result $a');
  `

The above function doesn't return anything. and the print statement never gets executed. But the transaction is successful in the UPI app (I was using google pay).

Getting onlu one upi App data

Getting only one upi app in list on both ios and android

final List appMetaList = await UpiPay.getInstalledUpiApplications();

why this happens.. both phones have lots of upi apps installed

ios gets only cointab app
android gets only icici bank app

Facing issue in SBI Pay - Uri Decode

@ symbol is not decoding properly in SBI Pay app alone.

For example
"xxxx@okhdfcbank" is working in all other apps.

In SBI pay alone it's not decoding properly. It's coming as "xxxx 40okhdfcbank"

Use Merchant Code while payment initiating

Hi upi_pay,
Thanks for the great plugin. Can you provide Merchant Code add option, while initiating payments? I can see that upi_india has this option.

Solution #
Add merchantCode in UpiPay.initiateTransaction() function. It is available in TransactionDetails class.

getInstalledUpiApplications return null

      ═══════ Exception caught by widgets library ═══════════════════════════════════
         The following NoSuchMethodError was thrown building Homes(dirty):
         The getter 'upiApplication' was called on null.
         Receiver: null
         Tried calling: upiApplication

    import 'package:flutter/material.dart';
    import 'package:upi_pay/upi_pay.dart';

  class Homes extends StatelessWidget {
     Future<List<ApplicationMeta>> payment() async {
       final List<ApplicationMeta> appMetaList =
        await UpiPay.getInstalledUpiApplications();
return appMetaList;
   }

   Widget appWidget(appMeta) {
      ApplicationMeta aps = appMeta;

print(aps.upiApplication);

return Column(
  mainAxisAlignment: MainAxisAlignment.center,
  children: <Widget>[
    aps.iconImage(48), // Logo
    Container(
      margin: EdgeInsets.only(top: 4),
      alignment: Alignment.center,
      child: Text(
        aps.upiApplication.getAppName(),
        textAlign: TextAlign.center,
      ),
    ),
  ],
);

}

   @override
   Widget build(BuildContext context) {
    List<ApplicationMeta> vas;
    Future<List<ApplicationMeta>> as = payment();
    as.then((value) => () {
          vas = value;

] });

      return appWidget(vas);
    }
  }

getInstalledUpiApplications return null value.

The plugin `upi_pay` uses a deprecated version of the Android embedding.

Describe the bug

The plugin upi_pay uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2
embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding:
https://flutter.dev/go/android-plugin-migration.

UPI Pay returning invalid response for successful transactions

Hi Team,

Am testing the UPI pay to collect the payments, and even after the successful transaction I am getting a failed response in the app.

I am using the same code we have in the example app for making the payment (just changes the UPI ID).

Here is the image of the response received:

Annotation 2020-08-14 181637

Please let me know if you need more details.

Regards,
Rajdeep Barad

IOS Upi Integration not working

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"

Android v2 embedded migration

i was trying to install this package but i got suggestion to migrate this package into android v2

Docs for migration:

https://flutter.dev/go/android-plugin-migration

Error: -

The plugin upi_pay uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

I am not getting the list UPI apps on my Android 10 device

I have referred to the duplicate issues but couldn't resolve the issue, So I made my own plugin since I needed only two apps to be integrated as UPI payment apps for my personal project, Now It is throwing Exception ActivityNotFoundException ,No activity found to handle an intent. What could be reason behind it ,If I may ask could you please help me this issue.

risk threshold exceeded hdfc app

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Enter VPA
  2. Trigger payment
  3. Go to opened UPI app
  4. ...

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environmental Details

  • OS: [e.g. Android 11]
  • Device: [e.g. OnePlus Nord]
  • Package Version: [e.g. v1.0.0]
  • UPI Applications in the device: [e.g. - GPay, Paytm]
  • Play Store: [e.g. Google, Mi, Vivo]
  • Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context

Add any other context about the problem here.

Support for other UPI apps

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.

Execution failed for task ':upi_pay:compileDebugKotlin'. > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction

Running Gradle task 'assembleDebug'...
e: C:\flutter.pub-cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (78, 42): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: C:\flutter.pub-cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (83, 15): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: C:\flutter.pub-cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (97, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':upi_pay:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

Whenever we open Any UPI app It's redirect to last app url.

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Enter VPA
  2. Trigger payment
  3. Go to opened UPI app
  4. ...

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environmental Details

  • OS: [e.g. Android 11]
  • Device: [e.g. OnePlus Nord]
  • Package Version: [e.g. v1.0.0]
  • UPI Applications in the device: [e.g. - GPay, Paytm]
  • Play Store: [e.g. Google, Mi, Vivo]
  • Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context

Add any other context about the problem here.

MiPay does not return proper transaction data

The raw response string contains no values for all parameters except the transaction ref which is copied back. An empty transaction ID is hence obtained by the library. This may be a blocker for client applications towards functionality.

transaction amount exceed limt showing solution? please?

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behaviour:

  1. Enter VPA
  2. Trigger payment
  3. Go to opened UPI app
  4. ...

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environmental Details

  • OS: [e.g. Android 11]
  • Device: [e.g. OnePlus Nord]
  • Package Version: [e.g. v1.0.0]
  • UPI Applications in the device: [e.g. - GPay, Paytm]
  • Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context

Add any other context about the problem here.

Kotlin Type Mismatch

I am getting the following error on android compile version 30

e: D:\Programs\Pub\Cache\hosted\pub.dartlang.org\upi_pay-0.2.4\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (155, 34):
 Type mismatch: inferred type is String? but String was expected```

iOS UPI app launch failure: Null check operator used on a null value

Hi...I want to use this package on iOS but I am not able to open google pay and its throwing me this issue. Pls check

iOS UPI app launch failure: Null check operator used on a null value

iOS UPI app launch failure: Null check operator used on a null value
flutter: iOS UPI app launch failure stack: #0 TransactionDetails.toString
package:upi_pay/src/transaction_details.dart:66
#1 UpiMethodChannel.launch
package:upi_pay/src/method_channel.dart:26
#2 IosTransactionHelper.transact
package:upi_pay/src/transaction.dart:57
#3 UpiTransactionHelper.transact
package:upi_pay/src/transaction.dart:22
#4 UpiPay.initiateTransaction
package:upi_pay/src/api.dart:73
#5 _ScreenState._onTap
package:test3/main.dart:95
#6 _ScreenState._appsGrid..
package:test3/main.dart:319
#7 _ScreenState._appsGrid..
package:test3/main.dart:319
#8 _InkResponseState._handleTap
package:flutter/…/material/ink_well.dart:989
#9 GestureRecognizer.invokeCallback
package:flutter/…/gestures/recognizer.dart:182
#10 TapGestureRecognizer.handleTapUp
package:flutter/…/gestures/tap.dart:607
#11 BaseTapGestureRecognizer._checkUp
package:flutter/…/gestures/tap.dart:296
#12 BaseTapGestureRecognizer.acceptGesture
package:flutter/…/gestures/tap.dart:267
#13 GestureArenaManager.sweep
package:flutter/…/gestures/arena.dart:157
#14 GestureBinding.handleEvent
package:flutter/…/gestures/binding.dart:443
#15 GestureBinding.dispatchEvent
package:flutter/…/gestures/binding.dart:419
#16 RendererBinding.dispatchEvent
package:flutter/…/rendering/binding.dart:287
#17 GestureBinding._handlePointerEventImmediately
package:flutter/…/gestures/binding.dart:374
#18 GestureBinding.handlePointerEvent
package:flutter/…/gestures/binding.dart:338

Thanks in advance

Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?

Describe the bug

Tried the example given in the page https://pub.dev/packages/upi_pay/example. Debugger throws this error.

e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (78, 42): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (83, 15): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity?
e: C:\Users\user\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\upi_pay-1.0.1\android\src\main\kotlin\com\drenther\upi_pay\UpiPayPlugin.kt: (97, 34): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Activity? 

MissingPluginException while trying to get all UPI apps

E/flutter ( 7357): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: MissingPluginException(No implementation found for method getAllUpiApps on channel com.az.upi_india)
E/flutter ( 7357): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159:7)
E/flutter ( 7357):
E/flutter ( 7357): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
E/flutter ( 7357): #2 MethodChannel.invokeListMethod (package:flutter/src/services/platform_channel.dart:347:40)
E/flutter ( 7357): #3 UpiIndia.getAllUpiApps (package:upi_india/upi_india.dart:23:24)

Android Version 6

Is there any other Kotlin/Java/AndroidManifest.xml configuration/modification required other than including the package?

Getting Error "U16: Risk Threshold Exceeded" in BHIM, Google Pay & Amazon Pay

Getting U16 error in BHIM, Google Pay & Amazon Pay. Although payment was successfully transferred in Phonepe.

UpiTransactionResponse txnResponse = await UpiPay.initiateTransaction(
amount: "10.00",
app: UpiApplication.bhim,
receiverName: "Birendra Singh",
receiverUpiAddress: "xxxxxxx@upi",
transactionRef: 'ORD4',
transactionNote: 'Test transaction'
);

Add Samsung Pay Mini in UPI list

Hello,
Lot of new upi apps released soon. Samsung Pay Mini provides better experience in low data situation. It's worth, while you add in your upi list.

Thanks,
Ajesh Baby

depricated android embedding

Describe the bug

Android embedding warning

To Reproduce

Just run the app in debug mode

Expected behaviour

without warning for future usage

Environmental Details

  • OS : Android 10
  • Device: Realme C2
  • Package Version: 1.0.1
  • UPI Applications in the device: GPay, Paytm
  • Play Store: Google
  • Other UPI / Payment packages used in the app: Stripe

Additional context

The plugin upi_pay uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

Some devices cannot find installed UPI apps list on android sdk 30, it works fine on sdk 29 and below, can anyone explain what to do for sdk 30

this is my code for fetching installed apps list

List<ApplicationMeta> upiApps = List();

@override
void initState() {
    super.initState();
    amount = widget.amountToAdd;
    SharedPreferences.getInstance().then((sharedPrefs) {
      authToken = sharedPrefs.getString(Constants.SHARED_PREF_AUTH_TOKEN);
      merchantId = sharedPrefs.getString(Constants.MCC_CODE);
      upiAddress = sharedPrefs.getString(Constants.UPI_ADDRESS);
    });
    UpiPay.getInstalledUpiApplications().then((upiApps) {
       setState(() {
          this.upiApps = upiApps;
       });
     });
}

await UpiPay.getInstalledUpiApplications() returning empty list

Describe the bug

A clear and concise description of what the bug is.
This package was working fine till November 2021. After that await UpiPay.getInstalledUpiApplications() method returning empty list. Setting statusType: UpiApplicationDiscoveryAppStatusType.all returning applications but getting payment failure response(U09-Timeout). Is there anything need to be added in Androidmanifest.xml or MainActivity.kt?

To Reproduce

Steps to reproduce the behaviour:

  1. Enter VPA
  2. Trigger payment
  3. Go to opened UPI app
  4. ...

Expected behaviour

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Environmental Details

  • OS: [e.g. Android 11]
  • Device: [e.g. OnePlus Nord]
  • Package Version: [e.g. v1.0.0]
  • UPI Applications in the device: [e.g. - GPay, Paytm]
  • Play Store: [e.g. Google, Mi, Vivo]
  • Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context

Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.