razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
106 stars 147 forks source link

App crashes when try to open razorpay windows #237

Open itspwk opened 2 years ago

itspwk commented 2 years ago

I have razorpay_flutter 1.2.9, When I try to open razorpay checkout app crashes with below error :

W/System.err(18248): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) W/System.err(18248): at android.os.Handler.dispatchMessage(Handler.java:106) W/System.err(18248): at android.os.Looper.loop(Looper.java:223) W/System.err(18248): at android.app.ActivityThread.main(ActivityThread.java:7656) W/System.err(18248): at java.lang.reflect.Method.invoke(Native Method) W/System.err(18248): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) W/System.err(18248): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) W/System.err(18248): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.nbu.paisa.inapp.client.api.PaymentsClient" on path: DexPathList

I think main problem is Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.nbu.paisa.inapp.client.api.PaymentsClient" on path: DexPathList

My flutter doctor result is

[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.22000.434], locale en-IN) [√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) [√] Chrome - develop for the web [√] Android Studio (version 2020.3) [√] VS Code (version 1.63.2) [√] Connected device (3 available)

sumedht commented 2 years ago

@itspwk Have u added proguard rule in app listed here

itspwk commented 2 years ago

@itspwk Have u added proguard rule in app listed here

Yes, I added these rules.

wa11breaker commented 2 years ago

@sumedht Try removing the order_id

    var options = {
      'key': '<Key>',
      'amount': 5000,
      'name': '<Name>',
      'description': <description>,
      // 'order_id': orderId,
      'prefill': {'contact': '1234567890, 'email': 'someone@email.com'},
    };
    _razorpay.open(options);
itspwk commented 2 years ago

@sumedht Try removing the order_id

    var options = {
      'key': '<Key>',
      'amount': 5000,
      'name': '<Name>',
      'description': <description>,
      // 'order_id': orderId,
      'prefill': {'contact': '1234567890, 'email': 'someone@email.com'},
    };
    _razorpay.open(options);

Still same problem

Suheb786 commented 2 years ago

Same here i think this problem could be in this latest version

itspwk commented 2 years ago

hey Razorpay team,

Do you have any solution for this.

harshuhere01 commented 2 years ago

i'm also facing same issue, tried all above mentioned solution, but it's not working , Kindly give solution of this problem Razorpay team.

ajay-zartek commented 2 years ago

Have the same issue.

Nishant3007 commented 2 years ago

i'm also facing same issue, tried all above mentioned solution, but it's not working , Kindly give solution of this problem Razorpay team.

any solution u have found?

harshuhere01 commented 2 years ago

yes , in my case , the issue is backend developer doesn't changed RazorPay api_key , that's why when i'm trying to open razorpay it causes errors. so verify your RazoPay API_KEY in frontend side and backend side. if found different add same key.

Nishant3007 commented 2 years ago

Have the same issue.

Please check with your backend dev or check at ur end if u r the one by making the live mode on razorpay u have to generate the new key make these changes and all rest things are working