Closed Lakshya7312 closed 11 months ago
@Lakshya7312
ToastAndroid.show(error.message, ToastAndroid.SHORT);
In this line, in catch of open function, the property message doesn't exist. Object error contains
You can replace that with,
ToastAndroid.show(error.description, ToastAndroid.SHORT);
I wasn't able to reproduce the crash, but this should resolve the issue for you. Seeing that the logs indicate that the crash isn't originating in the react-native-razorpay plugin.
ah, my bad brother! Thanks for helping me out, really appreciate it!
Description
As soon as you press the "cancel" button placed on the top right of the payment page, it causes the whole app to crash. It works fine if the payment goes through and even failure of payment case works but this specific case where you "cancel" the transaction by clicking the cross button on the top right causes the application to crash.
Razorpay Package Version :
"react-native-razorpay": "^2.3.0",
Java and Gradle Version (android) :
Managed by Expo.
What you did:
I clicked on the cross button present at the top right corner of the payment page to try to cancel the transaction.
What happened:
It caused the app to crash and resulted in this error from Expo:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Suggested solution:
Code example, screenshot, or link to a repository:
This is the code used to create my payment functions which is then called from a TouchableOpacity: