Tipsi-stripe: get undefined is not an object when trying to stripe.init

Created on 16 Apr 2017  路  13Comments  路  Source: tipsi/tipsi-stripe

simulator screen shot 16 apr 2017 6 01 45 pm

help wanted

Most helpful comment

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

All 13 comments

Same here.

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

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

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

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

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

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

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

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

@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:

@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.

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().

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

Was this page helpful?
0 / 5 - 0 ratings