Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

get undefined is not an object when trying to stripe.init #53

Closed
bossnass1986 opened this issue Apr 16, 2017 · 13 comments
Closed

get undefined is not an object when trying to stripe.init #53

bossnass1986 opened this issue Apr 16, 2017 · 13 comments
Assignees

Comments

@bossnass1986
Copy link

simulator screen shot 16 apr 2017 6 01 45 pm

@jsierles
Copy link

Same here.

@dmytrozavgorodniy
Copy link
Contributor

Hi @pmcguane, @jsierles, how you link tipsi-stripe module in project? TPSStripe.xcodeproj is added for your main .xcodeproj?
screen shot 2017-04-18 at 3 49 16 pm

@jsierles
Copy link

Sorry, I'm having this issue with Android. I have the library in my settings.gradle.

@bossnass1986
Copy link
Author

used react-native link tipsi-stripe and the file can be seen within Xcode

@dmytrozavgorodniy
Copy link
Contributor

@pmcguane could to please show, how you initialize tipsi-stripe module in your project?

@jsierles
Copy link

In my case, the following error shows up:

screen shot on 2017-04-18 at 19-58-58

With this initialization :
https://gist.github.com/jsierles/ce07a9befbb1f0d34b5045d8483d7d13

@artdent
Copy link

artdent commented Apr 21, 2017

@jsierles Have you made sure to include StripeReactPackage in the getPackages() method of your ReactNativeHost? Otherwise, NativeModules.StripeModule won't exist.

@jsierles
Copy link

@artdent Thanks, that was the problem. Working now.

@felipemartim
Copy link

felipemartim commented Apr 21, 2017

@artdent Thank you very much. It seems that this step isn't included in the Installation section of the readme.

@isnifer
Copy link
Contributor

isnifer commented Apr 22, 2017

@jsierles @felipemartim Hi, guys!
This step is not included in README because this action does react-native link
I did clean install of react-native app and install tipsi-stripe. Look into gif:
react-native-link

Info about linking dependencies in README:

@felipemartim
Copy link

@isnifer Maybe because I use React Native Navigation this step didn't work. Anyway, I think it could be added on the manual installation section.

@artdent
Copy link

artdent commented Apr 22, 2017

Right, react-native link might fail for a variety of reasons; for example, in my project, the android project is at the top level instead of being inside an android/ directory. (Not to mention, my ReactNativeHost is a top-level class instead of an inner class.) So the manual instructions, along with describing the modifications to build.gradle, should also include the step of modifying getPackages().

@isnifer
Copy link
Contributor

isnifer commented Apr 23, 2017

@felipemartim @artdent Hey, guys! I've added a PR that will improve README.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants