This web app renders an example of the Select Bank Widget and a button that launches the Lightbox directly. It is meant to be used with this repository's Android and iOS example apps to test and demonstrate the use of a WebView to integrate Trustly with a mobile app.
This project was bootstrapped with Create React App.
- Install dependencies
npm install
- Add your Trustly sandbox credentials
Copy the .env.sample
file to a new .env.local
file and fill out your environment variables.
- Run
npm start
This command runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
This example project can be run entirely as a frontend app in order to quickly test basic Trustly functions. However, your application will likely require backend integration with Trustly as well. Check out our trustly-nestjs-example project to learn more and follow the steps below to integrate it with this app.
Documentation: Securing Requests
- Clone and run the trustly-nestjs-example, in case you don't have a request signature server set
- Add the request signature endpoint (e.g.
http://localhost:8080/signature
in the NestJS Example) intoREACT_APP_TRUSTLY_SIGNATURE_API_URL
variable of the.env.local
file - Uncomment the
getRequestSignature
code snippet in theApp.js
file - Run your app