@connexup/react-native-square-mobile-payment-sdk
v0.1.2
Published
Mobile Payments SDK for React Native
Readme
react-native-square-mobile-payment-sdk
Mobile Payments SDK for React Native
Review requirements
Before getting started, please review the Requirements and Limitations and Device Compatibility sections to ensure that the SDK can be used in your project:
- Android: Requirements and Limitations, Device Compatibility
- iOS: Requirements and Limitations, Device Compatibility
Installation
yarn add react-native-square-mobile-payment-sdkBefore you start
You will need a Square account enabled for payment processing. If you have not enabled payment processing on your account (or you are not sure), visit squareup.com/activate.
Set-up your React Native environment by following the official guide.
For iOS:
- Make sure you run
pod installin theiosfolder of the sample application to install the SDK and all the dependencies. - On your application targets’
Build Phasessettings tab, click the + icon and chooseNew Run Script Phase. Create a Run Script in which you specify your shell (ex: /bin/sh), and add the following contents to the script area below the shell:
SETUP_SCRIPT=${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"/SquareMobilePaymentsSDK.framework/setup"
if [ -f "$SETUP_SCRIPT" ]; then
"$SETUP_SCRIPT"
fiMake sure this build phase is after any [CP] Embed Pods Frameworks or Embed Frameworks Build Phase.
For Android:
- Modify your
/android/build.gradleAddmaven { url 'https://sdk.squareup.com/public/android/' }inside theallprojects'srepositories {...}block - Disable Proguard by adding the following to your
/android/app/build.gradle:
android {
buildTypes {
release {
minifyEnabled false
shrinkResources false
}
}
}Documentation
Contributing
License
MIT
Made with create-react-native-library
