ReferenceError: Can't find variable: Razorpay
Trying to create a Razorpay order with my key_id and key_secret in React native with the following code, but getting the above error. Clearly I have to import Razorpay from somewhere, but I'm not sure from where I need to import it.
var instance = new Razorpay({
key_id: 'MY_KEY_ID',
key_secret: 'MY_KEY_SECRET'
});
The code you provided is taken from server side node sdk. You should never put any secret keys in client side applications as these can easily be stolen by anyone who has your app. For react-native you need client-side sdk, read here for iOS and Android installation and import instructions