question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Razorpay cancels payments on Android

See original GitHub issue

Description

We are facing an issue in our application (more specifically on android platform), where when we are in the payment gateway section on the page that requires us to enter OTP for our card. If the application is moved to the background (for let us say to get the OTP) the payment is cancelled and the error code says BAD_REQUEST_ERROR and the description is Payment processing cancelled by user which should not happen since the action was made to get OTP from SMS without cancelling the gateway page

Razorpay Package Version :

react-native-razorpay: ^2.2.9

Java and Gradle Version (android) :

gradle 4.2.2 java JDK 11

What you did:

If we go to another application or even move the current application to background while we are in the process of entering the OTP, razorpay cancels the payment with the error code and description as stated above

What happened:

The payment failed with error saying the user cancelled the payment. I cannot really provide a screen recording since it would contain card info but the error is very consistent and can easily be reproduced on an android device. We did not face this issue on our iOS app

Steps To Reproduce

  1. Initiate a payment process
  2. Get to the OTP page
  3. Navigate away from the app and open the SMS application
  4. Open the application again

Suggested solution:

I haven’t yet dug deeper into the code but will be looking into it and hopefully find the issue

Code example, screenshot, or link to a repository:

This is an email received from razorpay for failure which was not initiated by any user action

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
punndcoder28commented, Apr 21, 2022

Hi @vivekshindhe . It was indeed present in our project. I shall confirm if that fixes it by tomorrow EOD. Thanks for the reply.

0reactions
punndcoder28commented, Aug 30, 2022

Cool. Will reopen this if we come across this anytime again

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pause, Resume and Cancel a Subscription | Razorpay Docs
Log into the. Razorpay Dashboard. and click Subscriptions in the left menu. · Click the Subscription Id you want to cancel. · Click...
Read more >
How To Cancel Razorpay - Accept Payments Now | 2022 Guide
First, open the Google Play Store. · Click on menu, then go to "Subscriptions". · Choose the Razorpay - Accept Payments Now subscription...
Read more >
Cancel, pause, or change a subscription on Google Play
On your Android device, go to your subscriptions in Google Play. Select the subscription you want to cancel. Tap Cancel subscription. Follow the...
Read more >
razor pay is stuck when using with webview in xamarin android
I think I've faced a similar issue before. What's probably happening here is that razorpay is opening the payment confirmation screen in a ......
Read more >
Razorpay Integration in Android Studio - Codes Easy
This article walks you through Razorpay Integration in Android. Razorpay is an Online Payment System that provides payment methods like UPI, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found