square-reader-capacitor-plugin
v0.0.10
Published
Capacitor.js plugin for using the Square Card Reader SDK
Downloads
3
Maintainers
Readme
square-reader-capacitor-plugin
Capacitor.js plugin for using the Square Card Reader SDK
Install
npm install square-capacitor-plugin
npx cap sync
In your iOS project, add the SquareReaderSDK from these docs: https://developer.squareup.com/docs/reader-sdk/build-on-ios
Make sure to add the initialization line to the application delegate: https://developer.squareup.com/docs/reader-sdk/build-on-ios#step-6-add-code-to-initialize-the-reader-sdk
API
pluginTest()
pluginTest() => Promise<{ value: string; }>
Returns: Promise<{ value: string; }>
isAuthorized()
isAuthorized() => Promise<{ authorized: boolean; }>
Returns: Promise<{ authorized: boolean; }>
authorizeReaderSdk(...)
authorizeReaderSdk(options: { auth_code: string; }) => Promise<{ success: boolean; }>
| Param | Type |
| ------------- | ----------------------------------- |
| options
| { auth_code: string; } |
Returns: Promise<{ success: boolean; }>
startCheckout(...)
startCheckout(options: { amount: number; }) => Promise<{ success: boolean; }>
| Param | Type |
| ------------- | -------------------------------- |
| options
| { amount: number; } |
Returns: Promise<{ success: boolean; }>