@aigens/aigens-sdk-octopus
v0.5.0
Published
Aigens SDK Octopus
Downloads
12
Readme
aigens-sdk-octopus
Aigens SDK Octopus
Install
npm install aigens-sdk-octopus
npx cap sync
API
echo(...)
startCardOperation(...)
checkIncompleteTransaction(...)
getSDKVersion()
getFrameworkVersion()
startCardEnquiry(...)
getOldCardId(...)
cancelRequest()
- Interfaces
- Enums
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
startCardOperation(...)
startCardOperation(options: StartCardParams) => Promise<OctopusResult>
| Param | Type |
| ------------- | ----------------------------------------------------------- |
| options
| StartCardParams |
Returns: Promise<OctopusResult>
checkIncompleteTransaction(...)
checkIncompleteTransaction(options: { applicationType?: number; hasSuccessScreen?: boolean; hasStartAppLoading?: boolean; }) => Promise<OctopusResult>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------- |
| options
| { applicationType?: number; hasSuccessScreen?: boolean; hasStartAppLoading?: boolean; } |
Returns: Promise<OctopusResult>
getSDKVersion()
getSDKVersion() => Promise<{ SDKVersion: string; }>
Returns: Promise<{ SDKVersion: string; }>
getFrameworkVersion()
getFrameworkVersion() => Promise<{ frameworkVersion: string; }>
Returns: Promise<{ frameworkVersion: string; }>
startCardEnquiry(...)
startCardEnquiry(options: { applicationType?: number; deviceId?: string; }) => Promise<OctopusResult>
| Param | Type |
| ------------- | ------------------------------------------------------------- |
| options
| { applicationType?: number; deviceId?: string; } |
Returns: Promise<OctopusResult>
getOldCardId(...)
getOldCardId(options: { applicationType?: number; deviceId?: string; spid: string; timestamp: string; mposHmac: string; }) => Promise<OctopusResult>
| Param | Type |
| ------------- | ---------------------------------------------------------------------------------------------------------------- |
| options
| { applicationType?: number; deviceId?: string; spid: string; timestamp: string; mposHmac: string; } |
Returns: Promise<OctopusResult>
cancelRequest()
cancelRequest() => Promise<void>
Interfaces
OctopusResult
| Prop | Type |
| ----------------------- | ----------------------------------------------------- |
| reference
| string |
| octopusNo
| string |
| transactionAmount
| string |
| remainingValue
| string |
| paymentTime
| string |
| accountId
| string |
| oldCardNo
| string |
| resultStatus
| ResultStatus |
StartCardParams
| Prop | Type |
| ------------------------ | -------------------- |
| token
| string |
| ticket
| string |
| applicationType
| number |
| receiptId
| string |
| deviceId
| string |
| hasSuccessScreen
| boolean |
| hasStartAppLoading
| boolean |
| hasQrPayment
| boolean |
Enums
ResultStatus
| Members | Value |
| -------------------------------- | --------------------------------------- |
| 'SUCCESS'
| 'SUCCESS' |
| 'FAILED'
| 'FAILED' |
| 'CANCELLED'
| 'CANCELLED' |
| 'INVALID_INPUT'
| 'INVALID_INPUT' |
| 'INCOMPLETE'
| 'INCOMPLETE' |
| 'FRAMEWORK_NOT_UP_TO_DATE'
| 'FRAMEWORK_NOT_UP_TO_DATE' |
| 'NO_INCOMPLETE'
| 'NO_INCOMPLETE' |
| 'UNKNOWN'
| 'UNKNOWN' |