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

App crash when Razorpay.open() is called. #173

Open
abhijeet21sankalp opened this issue Aug 6, 2024 · 7 comments
Open

App crash when Razorpay.open() is called. #173

abhijeet21sankalp opened this issue Aug 6, 2024 · 7 comments

Comments

@abhijeet21sankalp
Copy link

com.razorpay.cordova plugin is not compatible for SDK version 34

I have implemented the plugin and update the
android-targetSdkVersion- 33 to 34,
android-compileSdkVersion 33 to 34
android-buildToolsVersion33 to 34 in config.xml file ,
when razorpay.open() method is called. razor pay application's Screen is invoked, but App is going to crash on Android 13+.

it is working for android-targetSdkVersion- 33

I've installed "com.razorpay.cordova": "github:razorpay/razorpay-cordova" this plugin

I've following code implemented in ionic V6 & installed Cordova Android Platform Version 12.0.1 =>

initializeRazorPayPayment(resData) {
let razorPayReqData = res.PaymentRequestModel;
var options = {
description: razorPayReqData.Description,
image: razorPayReqData.Image,
order_id: razorPayReqData.OrderId,
currency: razorPayReqData.Currency,
key: razorPayReqData.Key,
prefill: {
contact: razorPayReqData.PhoneNumber,
email: razorPayReqData.Email == null ? '' : razorPayReqData.Email
},
handler: function (response) {
},
amount: razorPayReqData.Amount,
name: razorPayReqData.CompayName,
theme: {
color: '#065bef'
},
retry: {
enabled: true,
max_count: 4
},
animation: true,
send_sms_hash: true,
remember_customer: true,
subscription_card_change: true,
modal: {
confirm_close: true,
handleback: true,
ondismiss: function () {
}
}
}
let successCallback = (success) => {
}
let cancelCallback = (error) => {
this.isConfirmReqSent = false;
this.confirmOrderReq = false;
let obj = {
razorpay_order_id: options.order_id,
payment_id: null,
description: error.description,
code: error.code,
reason: null,
source: null,
step: null,
}';
}
let failureCallback = (error) => {
let data = error.response.error;
let obj = {
razorpay_order_id: data.metadata.order_id,
payment_id: data.metadata.payment_id,
description: data.description,
code: data.code,
reason: data.reason,
source: data.source,
step: data.step,
};
}
RazorpayCheckout.on('payment.success', successCallback);
RazorpayCheckout.on('payment.cancel', cancelCallback);
RazorpayCheckout.on('payment.failed', failureCallback);
RazorpayCheckout.open(options);
}

@vivekshindhe
Copy link
Contributor

@abhijeet21sankalp Unable to reproduce the issue. Can you share the crash error logs? You should be able to find those in Android Studio logcat.

@abhijeet21sankalp
Copy link
Author

thank you for respond

when razorpay landing page is invoked then hide after 2 second & its stuck on white screen.
note-I've uploaded Screenshot
Screenshot_20240807_151833_Gainmore
Screenshot_20240807_151933_Gainmore (1)
Screenshot_20240807_151933_Gainmore

@abhijeet21sankalp Unable to reproduce the issue. Can you share the crash error logs? You should be able to find those in Android Studio logcat.

@vivekshindhe
Copy link
Contributor

@abhijeet21sankalp , we can't find much with just the screenshots. Logs would be much more helpful.

@abhijeet21sankalp
Copy link
Author

@abhijeet21sankalp , we can't find much with just the screenshots. Logs would be much more helpful.

Our application is Hybrid application in IONIC Cordova. we are not Building our application in android studio.

@vivekshindhe
Copy link
Contributor

That's fine. Even if it's not being bulit in Android Studio, when connected to the device, during development builds you can see the logs in Android Studio logcat for this application.

@vivekshindhe
Copy link
Contributor

@abhijeet21sankalp To reduce the TAT would request you to create a ticket in Razorpay Dashboard. You can put this Github Issue link in the ticket. This would help fast track the issue and resolution.

@pranavti-brique
Copy link

pranavti-brique commented Oct 17, 2024

@abhijeet21sankalp Is this issue resolved?
I am facing the same issue in my ionic Cordova app.

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

3 participants