0.0.1 • Published 11 months ago
Last release11 months ago
checkout-sheet-android
shopify checkout sheet for android capacitor plugin
Install
npm install checkout-sheet-android
npx cap sync
API
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
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'