video.mp4
This is an example of how you can use the Tap to Pay provided by Stripe SDK with React Native and Expo.
First, install npm on your computer.
npm install npm@latest -gFollow this different steps in order to reproduce the demonstration
- Clone the repository
git clone https://github.com/RambokDev/stripe-tap-to-pay-react-native.git
- Install NPM packages
npm install
- Enter your API url in
app.config.jsapiUrl: process.env.API_URL ?? 'https://your-api-url/'
npx expo prebuild npx expo run:androidIf an error occurred, you may add 'local.properties' file in android folder with the following code :
sdk.dir = /xxxxx/userxxxx/Library/Android/sdkor you can set an environment variable :
export ANDROID_HOME=/xxxxx/userxxxx/Library/Android/sdkWith expo services
eas build -p android --profile preview Locally
eas build -p android --profile preview --local Example of app.config.js
module.exports = ({config}) => {
return {
...config,
extra: {
apiUrl: process.env.API_URL ?? 'https://www.api-example.com/',
eas: {
projectId: "xxxxxxx"
},
runtimeVersion: {
policy: "sdkVersion"
},
}
}
}