azhar1038 / UPI-Plugin-Flutter

Flutter Plugin to do UPI transaction using different apps like PhonePe, Google Pay, PayTM etc.
MIT License
53 stars 38 forks source link

startTransaction() not returning anything #14

Closed pranayfating closed 4 years ago

pranayfating commented 4 years ago

when I implement the given example in a new app then it is working fine but when I implement it in an already released app(I want to update this app with your plugin) then the _upiIndia.startTransaction() is not returning anything(even not returning null). Please look at it. I need urgent help.

_upiIndia.startTransaction(
      app: app,
      receiverUpiId: 'upi_id',
      receiverName: 'name',
      transactionRefId: 'TestingUpiIndiaPlugin',
      transactionNote: 'Not actual. Just an example.',
      amount: 1.00,
    );
azhar1038 commented 4 years ago

Is it able to open the requested UPI app? Which UPI apps have you tried?

pranayfating commented 4 years ago

I tried Google pay, Paytm, and Phonepe. Yes, the app is opening but after that even if the transaction is successful it is not returning anything.

azhar1038 commented 4 years ago

when I implement the given example in a new app then it is working fine but when I implement it in an already released app(I want to update this app with your plugin) then the _upiIndia.startTransaction() is not returning anything(even not returning null).

Did you mean is it working in debug mode but not in release mode?

pranayfating commented 4 years ago

I have signed the app and have already released the app. Now I'm debugging it for the next update.

azhar1038 commented 4 years ago

Signing an app won't make any difference. If it is not working even in debug mode then maybe you haven't implemented it properly or it conflicts with any other plugin that you are using in your app. So I would recommend you to either clone and edit the repo to fit your requirement or try using any other plugin available in pub.

I am unable to reproduce your issue on my side. It is working fine even with a signed app.

kjdeepak commented 4 years ago

I am facing the same issue! The initiateTransaction(app.app); not returning anything! Tried for google pay, HDFC Bank and BHIM app

azhar1038 commented 4 years ago

Maybe the plugin is conflicting with any other plugin that you are using in your app. I tested the plugin on 16/07/2020 and it was working. Try using any other plugin or try writing your own taking reference from this plugin.

pranayfating commented 4 years ago

I am facing the same issue! The initiateTransaction(app.app); not returning anything! Tried for google pay, HDFC Bank and BHIM app

The issue in my case was this plugin was conflicting with the razorpay plugin. As soon as I removed the razorpay plugin everything worked fine.

azhar1038 commented 4 years ago

Believe it or not I created this plugin only because the plugin that existed before was conflicting with google_sign_in and I needed both.

kjdeepak commented 4 years ago

I am facing the same issue! The initiateTransaction(app.app); not returning anything! Tried for google pay, HDFC Bank and BHIM app

The issue in my case was this plugin was conflicting with the razorpay plugin. As soon as I removed the razorpay plugin everything worked fine.

What changes should I make in this plugin so I can keep both razorpay and this plugin. I am new to flutter and have zero knowdlege on java. @pranayfating A link or some external resource would be helpful.

@mdazharuddin1011999 Apologies if this is not the right channel to ask help.

azhar1038 commented 4 years ago

I don't know what changes you should make. I made this plugin from zero and it worked fine for me. I don't what causes the conflicts. Anyway if you are using razorpay, you won't need this plugin I guess.

kjdeepak commented 4 years ago

I don't know what changes you should make. I made this plugin from zero and it worked fine for me. I don't what causes the conflicts. Anyway if you are using razorpay, you won't need this plugin I guess.

Unfortunately my project requirement needs both. The admin will enable or disable certain payment option from backend through api.

metro636 commented 4 years ago

Modify razor pay plugin to return false if request code is not razorpay request code in Activity result