Closed gausu60 closed 9 months ago
@gausu60 The error means that the react-native-razorpay package is not installed or the code isn't able to find it. The object RazorpayCheckout is null. Can you check in node_modules if the package is installed, and if so, you can check the import statement for the RazorpayCheckout object is present?
yes Already I have installed "react-native-razorpay": "^2.3.0", but still error occurred.
@gausu60 Hey, are you using react-native-cli or expo? Unable to reproduce the issue. It would be very helpful if you can create a ticket at the Razorpay dashboard for a quick turnaround.
i am using expo but still error
@gausu60 how did you install the react-native-razorpay package? Also, did you prebuild the project after switching to development build?
i refer official document of razorpay i have try all different version not happening
Any update here? Kinda stuck on the same issue.
Hey @pranav750 , the issue above was because the build wasn't switched to development. Can you please try with switching it to development build and running the app after prebuild?
i have already used on development mode so still error occurred
@gausu60 Just tried too. Here are the commands I followed.
npx expo prebuild
npx expo start
-> expo go build
a
-> running app on android
{you'll see error mentioned above}
s
-> switch to development mode
a
-> run app on android.
It loaded the checkout page. Could you please try these in order and see if it works?
not working still same error
@gausu60 Would request you to create a ticket from the Razorpay Dashboard. That way, our team would be able to get on a call with you to sort out the issue. You can reference this ticket when you create the ticket. Will keep this issue open.
yes I have been ticket raised but not usefully for me . support team send documentation link only
@gausu60 can you please share your MID or the ticket number? We'll get in touch with you over a call for resolution.
{"code":"BAD_REQUEST_ERROR","description":"Invalid request payload","step":"NA","reason":"NA","source":"NA"} this error occurred now please anyone give me solution
is the issue resolved now or not
can anyone help me ? [TypeError: Cannot read property 'open' of null] this error occured when i click on pay btn this is my code below :- import RazorpayCheckout from "react-native-razorpay"; <TouchableOpacity style={styles.paybtn} onPress={() => { var options = { description: 'Online Furniture Sales', image: 'https://i.imgur.com/3g7nmJC.jpg', currency: 'INR', key: '', amount: '5000', name: 'VIVDeal', order_id: '',//Replace this with an order_id created using Orders API. prefill: { email: 'gausu@gmail.com', contact: '919165482569', name: 'Gausuddeen Shaikh' }, theme: {color: '#53a20e'} } RazorpayCheckout.open(options).then((data) => { // handle success alert(
Success: ${data.razorpay_payment_id}
); }).catch((error) => { // handle failure console.log('Error: ', error); alert(Error: ${error.code} | ${error.description}
); }); }}