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

getting error undefined | undefined while calling RazorpayCheckout.open(options) #121

Closed
rajkishoreandia opened this issue Oct 2, 2018 · 19 comments

Comments

@rajkishoreandia
Copy link

rajkishoreandia commented Oct 2, 2018

pay

Pay=() => {
let options = {
description: 'Credits towards consultation',
image: 'https://i.imgur.com/3g7nmJC.png',
currency: 'INR',
key: 'my_test_key',
amount: '5000',
name: 'foo',
prefill: {
email: 'void@razorpay.com',
contact: '9191919191',
name: 'Razorpay Software'
},
theme: {color: '#F37254'}
}
console.log(options)
RazorpayCheckout.open(options).then((data) => {
console.log('inside data')
// handle success
alert(Success: ${data.razorpay_payment_id});
}).catch((error) => {
// handle failure
console.log('inside failure')
console.log('error : '+error.code)
console.log('description : '+error.description)

  alert(`Error: ${error.code} | ${error.description}`);
});

}

@rajkishoreandia rajkishoreandia changed the title getting error undefined | undefined getting error undefined | undefined while calling RazorpayCheckout.open(options) Oct 2, 2018
@iThink32
Copy link
Contributor

iThink32 commented Oct 3, 2018

Hey @rajkishoreandia are you getting the callback? can you please verify with the sample app on this repo?

@iThink32
Copy link
Contributor

iThink32 commented Oct 8, 2018

closing due to inactivity.

@iThink32 iThink32 closed this as completed Oct 8, 2018
@Suryanandsingh
Copy link

Hi @iThink32
I have same issue. And I am using react-native-razorpay with expo.

@iThink32
Copy link
Contributor

iThink32 commented Dec 6, 2018

@Suryanandsingh we do not support expo , please go through our readme.

@Suryanandsingh
Copy link

Thanks @iThink32

@Suryanandsingh
Copy link

Suryanandsingh commented Dec 6, 2018

@iThink32 can you give me any idea how to connect razorpay python/django back-end with react native front-end using expo?

@iThink32
Copy link
Contributor

iThink32 commented Dec 6, 2018

@Suryanandsingh well here's a link I found as of now , will let you know if I find something better https://forums.expo.io/t/python-and-expo-integration/3976

@Suryanandsingh
Copy link

@iThink32 thanks to given me this information but i am asking have you any idea to create checkout form with react native using expo?because I am using django for back-end and react native for front-end using expo. And I mostly want to use razorpay for payment gateway.

@iThink32
Copy link
Contributor

iThink32 commented Dec 6, 2018

@Suryanandsingh from expo there is currently no way I can help you as of now , you might have to use our backend integrations to get Razorpay set up and invoke it via a https request

@Suryanandsingh
Copy link

@iThink32 Please can you give me any idea how to invoke it via a https request?

@iThink32
Copy link
Contributor

iThink32 commented Dec 6, 2018

@Suryanandsingh well this is something you have to look into , for a heads up I found this link
https://docs.expo.io/versions/latest/react-native/network

I meant use our available web integrations to set razorpay up on your backend and then communicate between your backend and the app by using https requests.

@bijuC1983
Copy link

@iThink32 We are facing the same issue in iOS and we are not using expo. We are using package version 2.1.31. Please note it was working fine for us and this started appearing all of a sudden without any changes to the checkout code.

@maskedTitan
Copy link

@bijuC1983 Can you please push your code to GitHub so that we can check?

@akhilsanker
Copy link

hi @bijuC1983 ,

Same issue here. Have you solved the issue?

@akhilsanker
Copy link

@iThink32 ,

Still facing the issue with 2.1.33, Need to reopen the issue

@Akulvarshney
Copy link

@akhilsanker any update? I'm facing the Error: undefined | undefined, and on console "open" is undefined. So if you had solve the issue. kindly help me as well.

@gxanshu
Copy link

gxanshu commented Jan 1, 2024

Its 1st Jan 2024 and i'm still getting error with expo. in README.md file they mentioned that this package support Expo then why its not opening payment window.

@vivekshindhe
Copy link
Contributor

@gxanshu @Akulvarshney
The issue is because of how expo works as a platform regarding native libraries.

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.

This fixed the issue for me. Could you please try these in order and see if it works?

@gxanshu
Copy link

gxanshu commented Jan 8, 2024

Thanks @vivek0079 it works for me too. but razorpay disabled my account 😑 so no need for it anymore.

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

9 participants