razorpay / razorpay-flutter

Razorpay Flutter Plugin
MIT License
107 stars 150 forks source link

For some devices razorpay complete payment but success callback is not calling. what is the issue ? #194

Open shrutika-tatkare-apptware opened 3 years ago

shrutika-tatkare-apptware commented 3 years ago

When we call open method from razorpay it's sometimes open with only grey screen and some times payment successfully done not call callback success method.

Flutter Version :

Flutter 2.0.5-0.0.pre.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 95fba3eb50 (3 months ago) • 2021-06-03 22:16:12 +0530 Engine • revision 2dce47073a Tools • Dart 2.12.2

Xcode Version :

Version 12.4 (12D4e)

Cocoapod Version :

razorpay-pod (1.1.12) razorpay_flutter (1.1.10):

Steps To Reproduce

steps that reproduce the issue.

  1. call open method with required fields
  2. do payment
  3. check after payment successful it not call success callback function
holy-dev commented 3 years ago

It's happening for me also

holy-dev commented 3 years ago

Found the issue, it's not returning any data for order id and signature.

holy-dev commented 3 years ago

I don't think it's an issue with the package itself, I think it's from the server.

Arnab28122000 commented 3 years ago

I am also facing the same issue, the payment success screen is coming, but none of the payment handlers are getting called, please help

ajsatam commented 3 years ago

Same is the case with us. A lot of time we have to manually reconcile the payments.

holy-dev commented 3 years ago

and there's no response from the team

sumedht commented 2 years ago

@shrutika-tatkare-apptware Apologies for connecting late. If u can provide more scenarios that will be helpful. In a reposting issue it's mention "sometimes" so can u provide scenario/steps for it?

Manojkumar-android commented 2 years ago

same issue . anyone got solution ?

Manikandan88564 commented 2 years ago

I am also facing this issue.. Any Solution?

Manikandan88564 commented 2 years ago

got output....

here is my code

@override void initState() { super.initState(); razorpay = Razorpay(); razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess); razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError); razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet); }

@override void dispose() { super.dispose(); razorpay.clear(); }

void flutterpayment(String orderId,int t) { var options = { "key": "rzp_test_LSWWTkxxxxxxx", "amount": t * 100, 'name': 'ghgjjg', 'currency': 'INR', 'description': 'maligai', 'external': { 'wallets': ['paytm'] }, 'retry': {'enabled': true, 'max_count': 1}, 'send_sms_hash': true, "prefill": {"contact": "978776576558", "email": "nitin@gmail.com"}, }; try { razorpay.open(options); } catch (e) { debugPrint('Error: e'); } }

void _handlePaymentSuccess(PaymentSuccessResponse response) { response.orderId;

 Fluttertoast.showToast(
     msg: "SUCCESS: " + response.paymentId!,
     toastLength: Toast.LENGTH_SHORT);

}

void _handlePaymentError(PaymentFailureResponse response) { Fluttertoast.showToast( msg: "ERROR: " + response.code.toString() + " - " + response.message!, toastLength: Toast.LENGTH_SHORT); }

void _handleExternalWallet(ExternalWalletResponse response) { Fluttertoast.showToast( msg: "EXTERNAL_WALLET: " + response.walletName!, toastLength: Toast.LENGTH_SHORT); }

Manojkumar-android commented 2 years ago

Hi @Manikandan88564 what's update in this code ? . if we use'retry': {'enabled': true, 'max_count': 1}, this problem resolves ?

Manikandan88564 commented 2 years ago

Yes @Manojkumar-android, that two resolves this problem

roshansingh1236 commented 11 months ago

Same issue here even the payment is success, SDK never return the success response, Razorpay team is not very helpful to resolve this issue