React Native wrapper to bridge PayPal iOS and Android SDK
npm install @bounceapp/react-native-paypal


React Native wrapper to bridge PayPal iOS and Android SDK,
support only requestBillingAgreement for the moment
| Android Device | Android Emulator | iOS Device | iOS Simulator | Expo GO | Web |
| -------------- | ---------------- | ---------- | ------------- | ------------ | --- |
| ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
``sh`
yarn add @bounceapp/react-native-paypal react-native-svg
`xml`
// android/app/src/main/AndroidManifest.xml
// ...
>
// ...
`ts`
// app.json
{
"expo": {
"android": {
"intentFilters": [
{
"action": "VIEW",
"data": [
{
"scheme": "${applicationId}.braintree"
}
],
"category": ["BROWSABLE", "DEFAULT"]
}
]
}
}
}
`js
// App.tsx
import React, { useState } from "react"
import { Button } from "react-native"
import {
requestBillingAgreement,
PaypalButton,
} from "@bounceapp/react-native-paypal"
export default function App() {
const [loading, setLoading] = useState(false)
const onPress = async () => {
const res = await requestBillingAgreement({
clientToken: "CLIENT_TOKEN",
})
if (res?.error) {
console.error(res?.error)
return
}
setLoading(false)
}
return
}
``
See the contributing guide to learn how to contribute to the repository and the development workflow.
The source code is made available under the MIT license. Some of the dependencies can be licensed differently, with the BSD license, for example.