A React Native module for the native (iOS and Android) Lyra Payment SDK.
Documentation : https://payzen.io/fr-FR/mobp/integration_guide/react_native/
Integration App Example : https://github.com/lyra/react-native-sdk-payment-example
Important
@lyracom/react-native-sdk-payment-module 2.x.x is now a TurboModule, and requires the new architecture to be enabled and react-native 0.77+.
- If you want to use @lyracom/react-native-sdk-payment-module 2.x.x, you need to enable the new architecture in your app (see "Enable the New Architecture for Apps") and upgrade to React-Native 0.77.x
- For React-Native 0.76.x and older, use @lyracom/react-native-sdk-payment-module 1.0.19
This project is a monorepo managed using Yarn workspaces. It contains the following packages:
- The library package in the root directory.
- An example app in the
example/
directory.
To get started with the project, run yarn
in the root directory to install the required dependencies for each package:
yarn
The example app demonstrates usage of the library. You need to run it to test any changes you make.
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
If you want to use Android Studio or XCode to edit the native code, you can open the example/android
or example/ios
directories respectively in those editors. To edit the Objective-C or Swift files, open example/ios/SdkPaymentModuleExample.xcworkspace
in XCode and find the source files at Pods > Development Pods > react-native-sdk-payment-module
.
To edit the Java or Kotlin files, open example/android
in Android studio and find the source files at react-native-sdk-payment-module
under Android
.
You can use various commands from the root directory to work with the project.
To start the packager:
yarn example start
To run the example app on Android:
yarn example android
To run the example app on iOS:
yarn example ios
To confirm that the app is running with the new architecture, you can check the Metro logs for a message like this:
Running "SdkPaymentModuleExample" with {"fabric":true,"initialProps":{"concurrentRoot":true},"rootTag":1}
Note the "fabric":true
and "concurrentRoot":true
properties.
MIT