1.0.10 • Published 5 years ago
clapn-stripe v1.0.10
clapn-stripe
Getting started
$ npm install clapn-stripe --save
Mostly automatic installation
$ react-native link clapn-stripe
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜clapn-stripe
and addRNStripe.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNStripe.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNStripePackage;
to the imports at the top of the file - Add
new RNStripePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':clapn-stripe' project(':clapn-stripe').projectDir = new File(rootProject.projectDir, '../node_modules/clapn-stripe/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':clapn-stripe')
Windows
- In Visual Studio add the
RNStripe.sln
innode_modules/clapn-stripe/windows/RNStripe.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Stripe.RNStripe;
to the usings at the top of the file - Add
new RNStripePackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNStripe from 'clapn-stripe';
// TODO: What to do with the module?
RNStripe;