TIM SDK
TIM API C
tim_error.h File Reference

Description

Tim error.

Object type tim_error.

Functions

ta_e_result_code_t ta_tim_error_get_result_code (ta_object_t response, ta_e_result_code_t *result_code)
 Result code. More...
 
ta_e_result_code_t ta_tim_error_get_error_message (ta_object_t response, ta_object_t *error_message)
 Returns the error message as transmitted from the terminal. More...
 
ta_e_result_code_t ta_tim_error_get_localized_message (ta_object_t response, ta_object_t *localized_message)
 Returns the localised error message in human readable form derived from the error code sent by the terminal. More...
 
ta_e_result_code_t ta_tim_error_get_localized_message2 (ta_object_t response, const char *language, ta_object_t *localized_message)
 Returns the localised error message in human readable form derived from the error code sent by the terminal. More...
 
ta_e_result_code_t ta_tim_error_get_native_error (ta_object_t response, ta_object_t *native_error)
 Native error if present or ta_object_invalid if not present. More...
 
ta_e_result_code_t ta_tim_error_get_ppinfo (ta_object_t response, ta_object_t *ppinfo)
 Payment protocol specific information. More...
 
ta_e_result_code_t ta_tim_error_get_additional_error_info (ta_object_t response, ta_object_t *additional_error_info)
 Additional error information mapping item text to item text code. More...
 
ta_e_result_code_t ta_tim_error_get_print_data (ta_object_t response, ta_object_t *print_data)
 Print data or ta_object_invalid if absent. More...
 
ta_e_result_code_t ta_tim_error_get_rejected_basket (ta_object_t response, ta_object_t *rejected_basket)
 Rejected basket as modified by host or null if absent. More...
 

Function Documentation

◆ ta_tim_error_get_additional_error_info()

ta_e_result_code_t ta_tim_error_get_additional_error_info ( ta_object_t  response,
ta_object_t additional_error_info 
)

Additional error information mapping item text to item text code.

Mandatory if any additional error information available.

Parameters
[in]responseObject instance of type tim_error.
[out]additional_error_infoPointer to variable to write object instance to. Object instance is of type map and is not retained. Keys and values are of type string and are retained by the map. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to additional_error_info.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentadditional_error_info is null-pointer.

◆ ta_tim_error_get_error_message()

ta_e_result_code_t ta_tim_error_get_error_message ( ta_object_t  response,
ta_object_t error_message 
)

Returns the error message as transmitted from the terminal.

The message language depends on the terminal but will generally be in English.

An empty string is returned if the terminal does not send a message.

Parameters
[in]responseObject instance of type tim_error.
[out]error_messagePointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to error_message.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumenterror_message is null-pointer.

◆ ta_tim_error_get_localized_message()

ta_e_result_code_t ta_tim_error_get_localized_message ( ta_object_t  response,
ta_object_t localized_message 
)

Returns the localised error message in human readable form derived from the error code sent by the terminal.

The message will be in the merchant language of the terminal provided systemInformation() has been executed (English otherwise).

Parameters
[in]responseObject instance of type tim_error.
[out]error_messagePointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to error_message.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumenterror_message is null-pointer.

◆ ta_tim_error_get_localized_message2()

ta_e_result_code_t ta_tim_error_get_localized_message2 ( ta_object_t  response,
const char *  language,
ta_object_t localized_message 
)

Returns the localised error message in human readable form derived from the error code sent by the terminal.

The message will be in the language supplied in the parameter.

Valid language strings are currently: "en","de","de-AT","de-CH","fr","fr-BE", "fr-CH","it","bg","hr","cs","nl","nl-BE","nl-NL","el","hu","lt","pl","pt", "ro","sk","sl","es","sv","fi","no","da"

"de" defaults to "de-CH" "fr" defaults to "fr-CH" "nl" defaults to "nl-BE"

Parameters
[in]responseObject instance of type tim_error.
[in]languageLanguage.
[out]error_messagePointer to variable to write object instance to. Object instance is of type string and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to error_message.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentlanguage is 0.
ta_c_rc_invalid_argumenterror_message is null-pointer.

◆ ta_tim_error_get_native_error()

ta_e_result_code_t ta_tim_error_get_native_error ( ta_object_t  response,
ta_object_t native_error 
)

Native error if present or ta_object_invalid if not present.

Parameters
[in]responseObject instance of type tim_error.
[out]native_errorPointer to variable to write object instance to. Object instance is of type native_error and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to native_error.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentnative_error is null-pointer.

◆ ta_tim_error_get_ppinfo()

ta_e_result_code_t ta_tim_error_get_ppinfo ( ta_object_t  response,
ta_object_t ppinfo 
)

Payment protocol specific information.

Mandatory if any information is given by the underlying payment protocol.

Parameters
[in]responseObject instance of type tim_error.
[out]ppinfoPointer to variable to write object instance to. Object instance is of type ppinfo and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to ppinfo.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentppinfo is null-pointer.

◆ ta_tim_error_get_print_data()

ta_e_result_code_t ta_tim_error_get_print_data ( ta_object_t  response,
ta_object_t print_data 
)

Print data or ta_object_invalid if absent.

Parameters
[in]responseObject instance of type tim_error.
[out]print_dataPointer to variable to write object instance to. Object instance is of type print_data and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to print_data.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentprint_data is null-pointer.

◆ ta_tim_error_get_rejected_basket()

ta_e_result_code_t ta_tim_error_get_rejected_basket ( ta_object_t  response,
ta_object_t rejected_basket 
)

Rejected basket as modified by host or null if absent.

Used for ta_c_guide_petrol only.

Parameters
[in]responseObject instance of type tim_error.
[out]rejected_basketPointer to variable to write object instance to. Object instance is of type basket and is not retained. Object instance is ta_object_invalid if value is not set in response.
Return values
ta_c_rc_okObject instance written to rejected_basket.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentrejected_basket is null-pointer.

◆ ta_tim_error_get_result_code()

ta_e_result_code_t ta_tim_error_get_result_code ( ta_object_t  response,
ta_e_result_code_t result_code 
)

Result code.

Parameters
[in]responseObject instance of type tim_error.
[out]result_codePointer to variable to write result code to.
Return values
ta_c_rc_okObject instance written to error_message.
ta_c_rc_invalid_argumentresponse is ta_object_invalid.
ta_c_rc_invalid_argumentresponse is not of type tim_error.
ta_c_rc_invalid_argumentresult_code is null-pointer.