Overview
Methods-Overview
- activateAsync()
- addEcrData(ecrInfo)
- addListener()
- applicationInformationAsync()
- balanceAsync()
- balanceInquiryAsync()
- cancel()
- canDcc() → {Boolean}
- canDeclinedReceipts() → {Boolean}
- canMultiAccountSelection() → {Boolean}
- changeSettingsAsync(settings)
- commitAsync()
- commitPartialAsync(amount)
- connectAsync()
- counterRequestAsync(counterType)
- dccRatesAsync()
- deactivateAsync()
- disconnectAsync()
- dispose()
- getActSeqCounter() → {Number}
- getBrands() → {Array.<timapi.Brand>}
- getConfigData() → {timapi.ConfigData}
- getEcrData() → {Array.<timapi.EcrInfo>}
- getFeatures() → {timapi.Features}
- getMerchantOptions() → {Array.<timapi.MerchantOption>}
- getPosId() → {String}
- getPrintOptions() → {Array.<timapi.PrintOption>}
- getSettings() → {timapi.TerminalSettings}
- getTerminalId() → {String}
- getTerminalStatus()
- getTransactionData() → {timapi.TransactionData}
- getUserId() → {String}
- hardwareInformationAsync()
- hasSwUpdate() → {Boolean}
- loginAsync()
- logoutAsync()
- rebootAsync()
- receiptRequestAsync(type)
- reconciliationAsync()
- reconfigAsync()
- removeListener()
- rollbackAsync()
- setEcrData(ecrData)
- setMerchantOptions(merchantOptions)
- setPosId(posId)
- setPrintOptions(printOptions)
- setTransactionData(ecrData)
- setUserId(userId)
- softwareUpdateAsync()
- systemInformationAsync()
- transactionAsync(type, amount)
- transactionCashbackAsync(type, amount, amountCashback)
- transactionTipAsync(type, amount, amountTip)
- transactionWithRequestAsync(type, request)
Constructor
new Terminal(settings)
Parameters:
Name | Type | Description |
---|---|---|
settings |
timapi.TerminalSettings |
Methods
activateAsync()
Returns immediately and calls activateCompleted on all notifiers once finished.
addEcrData(ecrInfo)
To remove all elements use setEcrData instead.
Parameters:
Name | Type | Description |
---|---|---|
ecrInfo |
timapi.EcrInfo | ecr information to add |
addListener()
Throws:
-
IllegalArgumentException If listener is undefined.
-
IllegalArgumentException If listener is registered.
applicationInformationAsync()
Requests the list of brands available on the terminal.
Returns immediately and calls applicationInformationCompleted on all notifiers once finished.
Side-Effect: Updates Brands member with all brands available on the terminal. Use getBrands to retrieve them.
balanceAsync()
Returns immediately and calls balanceCompleted on all notifiers once finished.
balanceInquiryAsync()
Get information about the current account balance of the inserted card.
Returns immediately and calls balanceInquiryCompleted on all notifiers once finished.
Note: This method is only available if guide advanced_retail is enabled.
cancel()
Aborts an open asynchronous Financial Transaction or Non-Financial Transaction request, except for a commitAsync or rollbackAsync request, which cannot be cancelled.
Further information: A Cancel-request is a best effort request. The EFT Terminal can ignore the Cancel-request if the request in progress is in a state it can not be cancelled. A Cancel-request has no effect if there's no open request of a Financial Transaction or Non-financial Transaction. If the EFT Terminal cancels the request in progress an error response is send back for the cancelled request (see chapter Abort Purchase for an example). Cancel-requests can be send multiple times in an attempt to cancel a request in progress but should be spaced by a few seconds. Cancel-requests themselves are never acknowledged by the EFT Terminal.
The Transaction request can only be cancelled before a Commit has been performed. Also the underlying payment protocol can restrict this functionality.
canDcc() → {Boolean}
Returns:
Type: Boolean
canDeclinedReceipts() → {Boolean}
Returns:
Type: Boolean
canMultiAccountSelection() → {Boolean}
Returns:
Type: Boolean
changeSettingsAsync(settings)
Returns immediately and calls changeSettingsCompleted on all notifiers once finished.
Parameters:
Name | Type | Description |
---|---|---|
settings |
Map.<timapi.constants.SettingType, String> | Dictionary of values for settings types to change. |
commitAsync()
Returns immediately and calls commitCompleted on all notifiers once finished.
commitPartialAsync(amount)
Returns immediately and calls commitCompleted on all notifiers once finished.
Parameters:
Name | Type | Description |
---|---|---|
amount |
timapi.Amount | Amount to commit |
connectAsync()
connectAsync
is not needed normally, because all methods make first a connect, if not connected.
Returns immediately and calls connectCompleted on all notifiers once finished.
counterRequestAsync(counterType)
Returns immediately and calls counterRequestCompleted on all notifiers once finished.
Parameters:
Name | Type | Description |
---|---|---|
counterType |
timapi.constants.CounterType |
dccRatesAsync()
Returns immediately and calls dccRatesCompleted on all notifiers once finished.
deactivateAsync()
Returns immediately and calls deactivateCompleted on all notifiers once finished.
disconnectAsync()
Returns immediately and calls disconnected on all notifiers once disconnect happened.
dispose()
getActSeqCounter() → {Number}
Returns:
Type: Number
getBrands() → {Array.<timapi.Brand>}
Note: This data is available after a login or application information request has been performed.
Returns:
Type: Array.<timapi.Brand>
getConfigData() → {timapi.ConfigData}
Note: This data is available after a system information request has been performed.
Returns:
Type: timapi.ConfigData
getFeatures() → {timapi.Features}
Returns:
Type: timapi.Features
getMerchantOptions() → {Array.<timapi.MerchantOption>}
Returns:
Type: Array.<timapi.MerchantOption>
getPosId() → {String}
Returns:
Type: String
getPrintOptions() → {Array.<timapi.PrintOption>}
Returns:
Type: Array.<timapi.PrintOption>
getSettings() → {timapi.TerminalSettings}
Returns:
Type: timapi.TerminalSettings
getTerminalId() → {String}
Returns:
Type: String
getTerminalStatus()
getTransactionData() → {timapi.TransactionData}
Returns:
Type: timapi.TransactionData
getUserId() → {String}
Returns:
Type: String
hardwareInformationAsync()
Returns immediately and calls hardwareInformationCompleted on all notifiers once finished.
hasSwUpdate() → {Boolean}
Returns:
Type: Boolean
loginAsync()
Returns immediately and calls loginCompleted on all notifiers once finished.
Note: Before calling set the print options, POS identifier and manufacturer flags set in the terminal instance.
Side-Effect: After completing the request updates the features, brands and terminal identifier in the terminal instance. Fetching these information can be disabled if Auto-FetchBrands is disabled in timapi.TerminalSettings.
logoutAsync()
Returns immediately and calls logoutCompleted on all notifiers once finished
rebootAsync()
Returns immediately and calls rebootCompleted on all notifiers once finished.
receiptRequestAsync(type)
Returns immediately and calls receiptRequestCompleted on all notifiers once finished.
Parameters:
Name | Type | Description |
---|---|---|
type |
timapi.constants.ReceiptRequestType | Type of receipts to receive. |
reconciliationAsync()
Returns immediately and calls reconciliationCompleted on all notifiers once finished.
reconfigAsync()
Returns immediately and calls reconfigCompleted on all notifiers once finished.
removeListener()
Throws:
-
IllegalArgumentException If listener is undefined.
-
IllegalArgumentException If listener is not registered.
rollbackAsync()
For payment protocols supporting the function a declined receipt may be generated.
Returns immediately and calls rollbackCompleted on all notifiers once finished.
setEcrData(ecrData)
Parameters:
Name | Type | Description |
---|---|---|
ecrData |
Array.<timapi.EcrInfo> | Array of ecr data |
setMerchantOptions(merchantOptions)
Parameters:
Name | Type | Description |
---|---|---|
merchantOptions |
Array.<timapi.MerchantOption> | Merchant options |
setPosId(posId)
Parameters:
Name | Type | Description |
---|---|---|
posId |
String | POS identifier |
setPrintOptions(printOptions)
Parameters:
Name | Type | Description |
---|---|---|
printOptions |
Array.<timapi.PrintOption> | Print options |
setTransactionData(ecrData)
Parameters:
Name | Type | Description |
---|---|---|
ecrData |
timapi.TransactionData | Array of ecr data |
setUserId(userId)
Parameters:
Name | Type | Description |
---|---|---|
userId |
String | User identifier |
softwareUpdateAsync()
Returns immediately and calls softwareUpdateCompleted on all notifiers once finished.
systemInformationAsync()
Request system information from the EFT Terminal.
Note: Set EcrData property before calling SystemInformation.
Returns immediately and calls systemInformationCompleted on all notifiers once finished.
transactionAsync(type, amount)
Returns immediately and calls transactionCompleted on all notifiers once finished.
Note: The transaction parameters are taken from TransactionData terminal property since those do not change often if at all (default parameters).
Parameters:
Name | Type | Description |
---|---|---|
type |
timapi.constants.TransactionType | Financial Transaction Function. |
amount |
timapi.Amount | Transaction amount. |
transactionCashbackAsync(type, amount, amountCashback)
Starts an EFT Terminal Transaction with Cashback amount.
Returns immediately and calls transactionCompleted on all notifiers once finished.
Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).
Note: This method is only available if guide advanced_retail is enabled.
Parameters:
Name | Type | Description |
---|---|---|
type |
timapi.constants.TransactionType | Financial Transaction Function. |
amount |
timapi.Amount | Transaction amount. |
amountCashback |
timapi.Amount | Cashback amount. |
transactionTipAsync(type, amount, amountTip)
Starts an EFT Terminal Transaction with Tip amount.
Returns immediately and calls transactionCompleted on all notifiers once finished.
Note: The transaction parameters are taken from TransactionRequest terminal property since those do not change often if at all (default parameters).
Note: This method is only available if guide gastro is enabled.
Parameters:
Name | Type | Description |
---|---|---|
type |
timapi.constants.TransactionType | Financial Transaction Function. |
amount |
timapi.Amount | Transaction amount. |
amountTip |
timapi.Amount | Proposed tip amount. |
transactionWithRequestAsync(type, request)
Returns immediately and calls transactionCompleted on all notifiers once finished.
Note: Allows enhanced transaction configuration compared to transactionAsync
Parameters:
Name | Type | Description |
---|---|---|
type |
timapi.constants.TransactionType | Financial Transaction Function. |
request |
timapi.TransactionRequest | Transaction parameters as TransactionRequest object. |