The aim of this repository is to explain how to integrate our Payment Mobile SDK into an Expo React Native application.
In order to be able to perform a successful payment with our Mobile SDK you must have:
- A contract with your Payment service provider
- A deployed server capable to communicate with the payment platform, in order to verify data and create the payment session (please check out java server sample or the integration documentation for more information).
- Your public key to initialize the SDK. This key can be found in the merchant back-office in Settings -> Shop -> API -> REST API Keys
- Your REST API Server Name to initialize the SDK. This key can be found in the merchant back-office in Settings -> Shop -> API -> REST API Keys
Please check our documentation to understand how to integrate our SDK in your Expo React Native application -> https://payzen.io/fr-FR/mobp/integration_guide/react_native/
-
Clone the repo,
git clone [email protected]:lyra/expo-sdk-payment-example.git
. -
Open the project under your IDE like Visual Studio Code.
-
Edit the following fields in
Config.ts
- merchantServerUrl: replace by your merchant server Url.
- publicKey: replace with your public key that you can find in your back-office.
- apiServerName: replace with your REST API server name that you can find in your back-office.
-
Run
yarn
-
Run
eas build --profile development --platform ios
(to test on iOS device). -
Run
eas build --profile development --platform android
(to test on Android device). -
Install the generated application in steps 5 and 6 on the corresponding device.
-
Run
expo start --dev-client
and that's all! :)
Check official integration documentation in order to check all possible error codes.
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.