@aigens/aigens-sdk-taptopaybystripe
v0.5.0
Published
Aigens Order.Place aigens-sdk-taptopaybystripe Plugin
Downloads
120
Readme
@aigens/aigens-sdk-taptopaybystripe
Aigens Order.Place Core Plugin
Install
npm install @aigens/aigens-sdk-taptopaybystripe
npx cap sync
API
isAllPermissionsGranted()
isInitializedTerminal()
verifyGpsEnabled()
getConnectionStatus()
getPaymentStatus()
requestAllPermissions()
initialize(...)
collectPayment(...)
discoverReader()
stopReader()
stopCollectPayment()
stopDiscovery()
disconnectReader()
addListener('onTapToPayFailure', ...)
addListener('onTapToPayLog', ...)
addListener('onTapToPaySuccess', ...)
addListener('onTapToPayDiscoverSuccess', ...)
addListener('onTapToPayConnectionStatusChange', ...)
addListener('onTapToPayUnexpectedReaderDisconnect', ...)
addListener('onTapToPayPaymentStatusChange', ...)
- Interfaces
isAllPermissionsGranted()
isAllPermissionsGranted() => Promise<BooleanResult>
Returns: Promise<BooleanResult>
isInitializedTerminal()
isInitializedTerminal() => Promise<BooleanResult>
Returns: Promise<BooleanResult>
verifyGpsEnabled()
verifyGpsEnabled() => Promise<BooleanResult>
Returns: Promise<BooleanResult>
getConnectionStatus()
getConnectionStatus() => Promise<TapToPayConnectionStatusChangeObject>
Returns: Promise<TapToPayConnectionStatusChangeObject>
getPaymentStatus()
getPaymentStatus() => Promise<TapToPayPaymentStatusChangeObject>
Returns: Promise<TapToPayPaymentStatusChangeObject>
requestAllPermissions()
requestAllPermissions() => Promise<any>
Returns: Promise<any>
initialize(...)
initialize(options: InitTapToPayParams) => Promise<any>
| Param | Type |
| ------------- | ----------------------------------------------------------------- |
| options
| InitTapToPayParams |
Returns: Promise<any>
collectPayment(...)
collectPayment(options: CollectTapToPayParams) => Promise<any>
| Param | Type |
| ------------- | ----------------------------------------------------------------------- |
| options
| CollectTapToPayParams |
Returns: Promise<any>
discoverReader()
discoverReader() => Promise<any>
Returns: Promise<any>
stopReader()
stopReader() => Promise<any>
Returns: Promise<any>
stopCollectPayment()
stopCollectPayment() => Promise<any>
Returns: Promise<any>
stopDiscovery()
stopDiscovery() => Promise<any>
Returns: Promise<any>
disconnectReader()
disconnectReader() => Promise<any>
Returns: Promise<any>
addListener('onTapToPayFailure', ...)
addListener(eventName: 'onTapToPayFailure', listenerFunc: (res: TapToPayFailureObject) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------------------- |
| eventName
| 'onTapToPayFailure' |
| listenerFunc
| (res: TapToPayFailureObject) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onTapToPayLog', ...)
addListener(eventName: 'onTapToPayLog', listenerFunc: (res: TapToPayLogObject) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | --------------------------------------------------------------------------------- |
| eventName
| 'onTapToPayLog' |
| listenerFunc
| (res: TapToPayLogObject) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onTapToPaySuccess', ...)
addListener(eventName: 'onTapToPaySuccess', listenerFunc: (res: TapToPayPaymentIntent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------------------- |
| eventName
| 'onTapToPaySuccess' |
| listenerFunc
| (res: TapToPayPaymentIntent) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onTapToPayDiscoverSuccess', ...)
addListener(eventName: 'onTapToPayDiscoverSuccess', listenerFunc: (res: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ---------------------------------------- |
| eventName
| 'onTapToPayDiscoverSuccess' |
| listenerFunc
| (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onTapToPayConnectionStatusChange', ...)
addListener(eventName: 'onTapToPayConnectionStatusChange', listenerFunc: (res: TapToPayConnectionStatusChangeObject) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| eventName
| 'onTapToPayConnectionStatusChange' |
| listenerFunc
| (res: TapToPayConnectionStatusChangeObject) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onTapToPayUnexpectedReaderDisconnect', ...)
addListener(eventName: 'onTapToPayUnexpectedReaderDisconnect', listenerFunc: (res: any) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | --------------------------------------------------- |
| eventName
| 'onTapToPayUnexpectedReaderDisconnect' |
| listenerFunc
| (res: any) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onTapToPayPaymentStatusChange', ...)
addListener(eventName: 'onTapToPayPaymentStatusChange', listenerFunc: (res: TapToPayPaymentStatusChangeObject) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
| Param | Type |
| ------------------ | ----------------------------------------------------------------------------------------------------------------- |
| eventName
| 'onTapToPayPaymentStatusChange' |
| listenerFunc
| (res: TapToPayPaymentStatusChangeObject) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
Interfaces
BooleanResult
| Prop | Type |
| ------------ | -------------------- |
| result
| boolean |
TapToPayConnectionStatusChangeObject
| Prop | Type |
| ------------ | ----------------------------------------------------------- |
| status
| 'NOT_CONNECTED' | 'CONNECTING' | 'CONNECTED' |
TapToPayPaymentStatusChangeObject
| Prop | Type |
| ------------ | -------------------------------------------------------------------------- |
| status
| 'NOT_READY' | 'READY' | 'WAITING_FOR_INPUT' | 'PROCESSING' |
InitTapToPayParams
| Prop | Type |
| --------------- | ------------------- |
| url
| string |
| storeId
| string |
| sid
| string |
| stationId
| string |
CollectTapToPayParams
| Prop | Type |
| -------------------- | -------------------- |
| amount
| number |
| currency
| string |
| brandName
| string |
| clientSecret
| string |
| processPayment
| boolean |
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove
| () => Promise<void> |
TapToPayFailureObject
| Prop | Type |
| ------------------- | -------------------------------------------------------------- |
| type
| 'Initialize' | 'DiscoverError' | 'CollectError' |
| errorCode
| string |
| errorMessage
| string |
| detailMessage
| string |
| message
| string |
TapToPayLogObject
| Prop | Type |
| ------------- | ------------------- |
| message
| string |
TapToPayPaymentIntent
| Prop | Type |
| ------------------------ | -------------------- |
| amount
| number |
| amountCapturable
| number |
| amountTip
| number |
| amountReceived
| number |
| cancellationReason
| string |
| captureMethod
| string |
| clientSecret
| string |
| confirmationMethod
| string |
| created
| number |
| currency
| string |
| customer
| string |
| description
| string |
| id
| string |
| invoice
| string |
| livemode
| boolean |
| metadata
| object |
| paymentMethod
| object |
| receiptEmail
| string |
| review
| string |
| status
| string |