Closed Abhi0059 closed 3 years ago
@Abhi0059 Getting this issue on iOS or Android? Looks like lib is not imported properly so it's not able to get related classes & hence giving undefine as an error.
@sumedht i am working on android .. i think it is imported properly because my payments are going to admin panel(razorpay).
Could you create a sample project where you are able to produce this error and send the same to us? That would be really helpful. The information provided isn't much to go on, and the issue isn't reproducible by us.
Thanks.
@vivekshindhe ok
Hi @vivekshindhe i created a sample project where i am getting same issue... where i have to send ?
Please send it at vivek.shindhe@razorpay.com
Hi @vivekshindhe Please check sample project at vivek.shindhe@razorpay.com
@Abhi0059 I just checked the project you shared and it's working just fine. Please try completely uninstalling and cleaning cache before reinstalling and trying this again.
Hi @vivekshindhe, i run that same code on 3 different android devices.. but still getting same error.. did you checked with same API key which i shared to you?
@Abhi0059 Yes. I didn't change anything.
@vivekshindhe i also tried making build for 2 different Systems ... mac and windows but still getting same.. can you please help me out via skype, phone call, google meet any which ever suitable for you.
@Abhi0059 Sure. Let's connect over a call. Could you please send your email-address that is registered with Razorpay and your Merchant ID to vivek.shindhe@razorpay.com so we can set up this call? Thank you for your patience.
@vivekshindhe Thanks .. finally i got the issue.. now it is working fine.
@Abhi0059 Could you please explain what the issue was?? This may help people with the same issue in the future.
Also, closing the issue. Please feel free to open another one if needed.
Thank you.
Yes @vivekshindhe , the code which i sent you.. i was alerting "${amount}" in (alert(Success: ${data.razorpay_payment_id} ${amount}
)) which was the issue..here amount is not defined.. so it goes to catch block.. but don't know how it was running at your end.
I had changed that after seeing there was no variable in that name guessing there was some different code that was missing when creating the sample project. Glad you were able to resolve your issue.
Can You Send Screenshot
it was working fine before...suddenly i am getting error undefined | undefined while calling RazorpayCheckout.open .. i didn't change anything... i was using react-native-razorpay:2.2.2 and googled about this issue.. some says to update it . so i did react-native-razorpay:2.2.5 but still getting same issue... please help me out.. thanks in advance.
var options = { description: 'Credits towards consultation', image: 'https://i.imgur.com/3g7nmJC.png', currency: 'INR', key: 'xxxxxxx', amount:
${amount}00
, name: userName, order_id: 'order_1', prefill: { email: userEmail, contact: userPhone, name: userName, }, theme: {color: '#6699ff'}, }; RazorpayCheckout.open(options) .then((data) => { alert(Success: ${data.razorpay_payment_id}
, ); }) .catch((error) => { alert(Error: ${error.code} | ${error.description}
); }); }