pinelabs-react-native-sdk
v1.0.0
Published
React Native bridge for Pine Labs native iOS and Android SDKs.
Readme
pinelabs-react-native-sdk
React Native bridge for Pine Labs native payment SDKs on Android and iOS.
What Is Implemented
- Android native bridge using
ExpressSDKInitializerfrom Pine Labs Android SDK. - iOS native bridge using
PineLabsOnlineSDKManagerfrom Pine Labs iOS SDK. - Unified JS API with normalized callback payloads across both platforms.
Install
npm install pinelabs-react-native-sdkUsage
import { startPayment } from 'pinelabs-react-native-sdk';
const result = await startPayment(orderToken, 'uat');
console.log(result);API
startPayment(orderToken, environment?)
orderToken:string(required)environment:'uat' | 'prod'(optional, default'uat')
Returns a Promise resolving with one of:
{ type: 'success', status: 'success', orderId, code?, message?, description? }{ type: 'failure', status: 'failure', orderId, code, message, description? }{ type: 'cancel', status: 'cancelled', orderId?, code, message, description? }{ type: 'backPressed', status: 'backPressed', code, message }(primarily iOS)
iOS Requirements
- iOS deployment target
13.0+ - Vendored framework path:
ios/Frameworks/PineLabsOnline_IOS_SDK.xcframework
Android Requirements
minSdkVersion 26+- Java/Kotlin target
17 - Maven
https://jitpack.io - Native dependency:
com.github.plural-pinelabs:Pinelabs-Android-SDK:1.10.0
Local Validation Before Publishing
npm pack --dry-runEnsure package contents include only:
src/ios/android/react-native.config.jsREADME.md
