Terminal methods overview
The basic operation modes of terminal function calls are:
-
Synchronous
Function calls are blocking and return after the operation has finished. Error code is provided and indicates if request was successful or not. -
Asynchronous
Function call returns immediately after the operation has started successfully. A user-implemented callback function will then be called, after the operation has finished. All callback functions receive an event. The event contains a result_code indicating if there were errors or not. The user-implemented callback function has to be registered with add_listener.
Functions called on terminal perform synchronous by default. The asynchronous method has the same name with _aync appended to its name.
Code example for adding a terminal listener:
/*
* Example for adding a terminal status listener
*
* \param[in] terminal Terminal instance
*/
void add_status_listener(ta_object_t terminal) {
ta_object_t listener = ta_object_invalid;
ta_s_terminal_listener_t listener_config;
// clear listener-config
memset(&listener_config, 0, sizeof(listener_config));
// add user-implemented callback to listener-config
listener_config.terminal_status_changed = mylistener_terminal_status_changed;
// optional: add user content to listener,
// pointer will be handed over to all callbacks:
//listener_config.user_pointer = &custom_struct;
// create listener-object
ta_terminal_listener_create(&listener, &listener_config);
// add listener-object to terminal
ta_terminal_add_listener(terminal, listener);
// release listener-object
ta_object_release(listener);
}
/*
* Callback for terminal status changes
*
* Will be called when status of terminal changes.
* \param[in] terminal Terminal instance
* \param[in] user_pointe User-pointer which can be set in the terminal listener
*/
void mylistener_terminal_status_changed(ta_object_t terminal, void *user_pointer) {
// implement your code to process status change here...
//printf(" > listener_terminal_status_changed\n");
}
Main / guide Retail terminal functions
Sync method
Async method
Guide Petrol terminal functions
Sync method
Async method
| Completed event | Description |
|---|---|
| ta_terminal_init_transaction | |
| ta_terminal_init_transaction_async | |
| init_transaction_completed | Retrieve card data for the presented card. |
Guide Unattended terminal functions
Sync method
Async method
| Completed event | Description |
|---|---|
| ta_terminal_open_reader | |
| ta_terminal_open_reader_async | |
| open_reader_completed | Opens the shutter of the card reader. |
| ta_terminal_amt_adjustment | Send an amount adjustment notification to the terminal during an open transaction. The amount is used as the new amount for the transaction. |
| ta_terminal_close_maintenance_window | |
| ta_terminal_close_maintenance_window_async | |
| close_maintenance_window_completed | Prohibits the EFT terminal from performing any triggered maintenance tasks. |
| ta_terminal_close_reader | |
| ta_terminal_close_reader_async | |
| close_reader_completed | Closes the shutter of the card reader. |
| ta_terminal_commit | |
| ta_terminal_commit_async | |
| commit_completed | Commits a transaction after succesful authorization. A lower amount may be commited than the authorized amount. |
| ta_terminal_eject_card | |
| ta_terminal_eject_card_async | |
| eject_card_completed | Ejects the card from the card reader. |
| ta_terminal_hold_commit | Increases the commit timeout. |
| ta_terminal_open_maintenance_window | |
| ta_terminal_open_maintenance_window_async | |
| open_maintenance_window_completed | Opens a maintenance window where the terminal can perform all maintenance processes it was not able to perform before.> |
Banking terminal functions
Sync method
Async method
| Completed event | Description |
|---|---|
| ta_terminal_balance_inquiry | |
| ta_terminal_balance_inquiry_async | |
| balance_inquiry_completed | Perform a balance check of a card/account on the terminal. |
Guide Dialog terminal functions
Sync method
Async method
| Completed event | Description |
|---|---|
| ta_terminal_open_dialog_mode | |
| ta_terminal_open_dialog_mode_async | |
| open_dialog_mode_completed | Open dialog mode on the terminal. |
| ta_terminal_close_dialog_mode | |
| ta_terminal_close_dialog_mode_async | |
| close_dialog_mode_completed | Close dialog mode on the terminal. |
| ta_terminal_show_dialog | |
| ta_terminal_show_dialog_async | |
| show_dialog_completed | Show dialog on the terminal. |
| ta_terminal_show_signature_capture | |
| ta_terminal_show_signature_capture_async | |
| show_signature_capture_completed | Show signature capture on the terminal. |
Additional terminal listener-events
| Listener-event | Description |
|---|---|
| request_completed | Operation started by an asynchronous function has finished. |
| Applications can use both operation specific completion callback | |
| in combination with this generic completion callback. | |
| terminal_status_changed | The terminal status has changed. The new status can be |
| retrieved from the TerminalStatus property. |