Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when user cancels payment on OTP page #357

Open
anzerahammed opened this issue Dec 14, 2023 · 1 comment
Open

Exception when user cancels payment on OTP page #357

anzerahammed opened this issue Dec 14, 2023 · 1 comment

Comments

@anzerahammed
Copy link

anzerahammed commented Dec 14, 2023

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Add card details, click pay now. Once OTP screen appears, click on 'complete payment on bank page'. Click on cancel in bank OTP page.

  • Works fine in iOS
  • Issue with android

razor pay version
razorpay_flutter: ^1.3.5

E/flutter (14767): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map<dynamic, dynamic>?' in type cast
E/flutter (14767): #0 PaymentFailureResponse.fromMap (package:razorpay_flutter/razorpay_flutter.dart:150:44)
E/flutter (14767): #1 Razorpay._handleResult (package:razorpay_flutter/razorpay_flutter.dart:72:42)
E/flutter (14767): #2 Razorpay.open (package:razorpay_flutter/razorpay_flutter.dart:54:5)
E/flutter (14767):

Flutter Version :

Flutter (Channel stable, 3.13.9, on macOS 14.1.1 23B81 darwin-arm64, locale en-IN)

Xcode Version :

Version 15.0.1 (15A507)

Cocoapod Version :

  • razorpay-pod (1.3.4)
  • razorpay_flutter (1.1.10):

Steps To Reproduce

Razorpay razorpay = Razorpay();
var options = {
'key': 'rzp_live_ILgsfZCZoFIKMb',
'amount': 100,
'name': 'Acme Corp.',
'description': 'Fine T-Shirt',
'retry': {'enabled': true, 'max_count': 1},
'send_sms_hash': true,
'prefill': {'contact': '8888888888', 'email': 'test@razorpay.com'},
'external': {
'wallets': ['paytm']
}
};
razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, handlePaymentErrorResponse);
razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, handlePaymentSuccessResponse);
razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, handleExternalWalletSelected);
razorpay.open(options);
2. Enter any card details
3. Click on pay now
4. Clock on 'Complete on banks page' when OTP screen appears
5. Click on cancel button

Expected Results

Go back to the razor pay payment options page

@OutdatedGuy
Copy link

Hi @anzerahammed, you can use below code till this is fixed

dependencies:
  razorpay_flutter:
    git:
      url: https://github.com/OutdatedGuy/razorpay-flutter
      ref: stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants