checkout-sheet-android
v0.0.1
Published
shopify checkout sheet for android capacitor plugin
Downloads
3
Readme
checkout-sheet-android
shopify checkout sheet for android capacitor plugin
Install
npm install checkout-sheet-android
npx cap sync
API
presentCheckout(...)
preloadCheckout(...)
configure(...)
addListener('checkoutCompleted' | 'checkoutCanceled' | 'checkoutFailed' | 'webPixelEvent' | 'checkoutLinkClicked', ...)
removeAllListeners()
- Interfaces
- Type Aliases
presentCheckout(...)
presentCheckout(options: { checkoutUrl: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------- |
| options
| { checkoutUrl: string; } |
preloadCheckout(...)
preloadCheckout(options: { checkoutUrl: string; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------- |
| options
| { checkoutUrl: string; } |
configure(...)
configure(options: { config: CheckoutConfiguration; }) => Promise<void>
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------ |
| options
| { config: CheckoutConfiguration; } |
addListener('checkoutCompleted' | 'checkoutCanceled' | 'checkoutFailed' | 'webPixelEvent' | 'checkoutLinkClicked', ...)
addListener(eventName: 'checkoutCompleted' | 'checkoutCanceled' | 'checkoutFailed' | 'webPixelEvent' | 'checkoutLinkClicked', listenerFunc: (event: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| eventName
| 'checkoutCompleted' | 'checkoutCanceled' | 'checkoutFailed' | 'webPixelEvent' | 'checkoutLinkClicked' |
| listenerFunc
| (event: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
removeAllListeners()
removeAllListeners() => Promise<void>
Interfaces
CheckoutConfiguration
| Prop | Type |
| ------------------- | ------------------------------------------------------- |
| colorScheme
| ColorScheme |
| preloading
| Preloading |
| errorRecovery
| ErrorRecovery |
Preloading
| Prop | Type |
| ------------- | -------------------- |
| enabled
| boolean |
ErrorRecovery
| Prop | Type |
| ---------------------------- | ---------------------------------------------------------------------------------------- |
| shouldRecoverFromError
| ((error: CheckoutException) => boolean) |
CheckoutException
| Prop | Type |
| ------------------- | -------------------- |
| code
| string |
| message
| string |
| isRecoverable
| boolean |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |
Type Aliases
ColorScheme
'Automatic' | 'Light' | 'Dark' | 'Web'