razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
106 stars 149 forks source link

RazorPay cancel payment is not working in release mode.(flutter Dependency: razorpay_web: ^1.3.6) #288

Closed deepakbirania closed 1 year ago

deepakbirania commented 1 year ago

Razorpay_web plungin working fine for normal flow but when user cancel the payment by clicking on cancel(X) button then its not working. Not receive any failure callback. (only happen in profile and release mode in debug mode its working fine)

Browser console print this error.

js_helper.dart:1124 Uncaught NoSuchMethodError: method not found: 'call'
Receiver: Closure 'RazorpayFlutterPlugin_startPayment_closure0'
Arguments: [null]
    at Object.wrapException (js_helper.dart:1124:37)
    at RazorpayFlutterPlugin_startPayment_closure0.noSuchMethod$1 (core_patch.dart:65:5)
    at RazorpayFlutterPlugin_startPayment_closure0.call$1 (main.dart.js:107822:19)
    at Object.Primitives_applyFunction (js_helper.dart:849:11)
    at Object.Function_apply (core_patch.dart:84:23)
    at _callDartFunction (js_patch.dart:41:32)
    at js_patch.dart:434:55
    at checkout.js:1:222219

flutter doctor -v

[✓] Flutter (Channel beta, 3.6.0-0.1.pre, on macOS 11.6.8 20G730 darwin-x64, locale en-IN)
    • Flutter version 3.6.0-0.1.pre on channel beta at /Users/deepakkumar/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 75927305ff (4 weeks ago), 2022-11-17 05:52:50 +0530
    • Engine revision b754eabc98
    • Dart version 2.19.0 (build 2.19.0-374.1.beta)
    • DevTools version 2.19.0

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/deepakkumar/AndroidStudioProjects/androidSDK
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13C100
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] Android Studio
    • Android Studio at /Users/deepakkumar/Downloads/Android Studio Preview.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.73.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] VS Code (version 1.55.2)
    • VS Code at /Users/deepakkumar/Downloads/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • Redmi Note 9 Pro Max (mobile) • 192.168.1.8:5555 • android-arm64  • Android 10 (API 29)
    • macOS (desktop)               • macos            • darwin-x64     • macOS 11.6.8 20G730 darwin-x64
    • Chrome (web)                  • chrome           • web-javascript • Google Chrome 108.0.5359.98

[✓] HTTP Host Availability
    • All required HTTP hosts are available
muhd-ameen commented 1 year ago

I'm facing this issue, working in debug and not able to payment in release web, is this issue fixed, how you fixed it

deepakbirania commented 1 year ago

Bro I'm not getting any solution for this, and also this SDK is not official. I suggest you use a web native sdk for Flutter web. It's working fine for me.

https://razorpay.com/docs/payments/payment-gateway/web-integration/standard/

On Fri, Apr 28, 2023 at 12:12 AM Muhammed Ameen @.***> wrote:

I'm facing this issue, working in debug and not able to payment in release web, is this issue fixed, how you fixed it

— Reply to this email directly, view it on GitHub https://github.com/razorpay/razorpay-flutter/issues/288#issuecomment-1526156246, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZ4FKZH53RLSSWLBQ6NVTLXDK4YBANCNFSM6AAAAAAS7HC67Y . You are receiving this because you modified the open/close state.Message ID: @.***>

--

Kind regards, Deepak kumar 9813760707 Android Developer YAASHVI SOFTWARE