$ npm install @monoku/react-native-payments-google-pay --save
$ react-native link @monoku/react-native-payments-google-pay
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜@monoku/react-native-payments-google-pay
and addRNPaymentsGooglePay.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNPaymentsGooglePay.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNPaymentsGooglePayPackage;
to the imports at the top of the file - Add
new RNPaymentsGooglePayPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':@monoku/react-native-payments-google-pay' project(':@monoku/react-native-payments-google-pay').projectDir = new File(rootProject.projectDir, '../node_modules/@monoku/react-native-payments-google-pay/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':@monoku/react-native-payments-google-pay')
- In Visual Studio add the
RNPaymentsGooglePay.sln
innode_modules/@monoku/react-native-payments-google-pay/windows/RNPaymentsGooglePay.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Payments.Google.Pay.RNPaymentsGooglePay;
to the usings at the top of the file - Add
new RNPaymentsGooglePayPackage()
to theList<IReactPackage>
returned by thePackages
method
import RNPaymentsGooglePay from '@monoku/react-native-payments-google-pay';
// TODO: What to do with the module?
RNPaymentsGooglePay;