Capacitor.js plugin for using the Square Card Reader SDK
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
pluginTest() => Promise<{ value: string; }>
Returns: Promise<{ value: string; }>
isAuthorized() => Promise<{ authorized: boolean; }>
Returns: Promise<{ authorized: boolean; }>
authorizeReaderSdk(options: { auth_code: string; }) => Promise<{ success: boolean; }>
Param | Type |
---|---|
options |
{ auth_code: string; } |
Returns: Promise<{ success: boolean; }>
startCheckout(options: { amount: number; }) => Promise<{ success: boolean; }>
Param | Type |
---|---|
options |
{ amount: number; } |
Returns: Promise<{ success: boolean; }>