TIM SDK
TIM API C
custom_receipt_formatter.h File Reference

Description

Custom receipt formatter.

Object type custom_receipt_formatter.

Data Structures

struct  ta_s_custom_receipt_formatter_text_element
 Custom receipt formatter text element definition. More...
 
struct  ta_s_custom_receipt_formatter_line_format
 Custom receipt formatter line definition. More...
 
struct  ta_s_custom_receipt_formatter_configuration
 Custom receipt formatter configuration. More...
 

Typedefs

typedef enum ta_e_custom_receipt_formatter_text_type ta_e_custom_receipt_formatter_text_type_t
 Custom receipt formatter text types.
 
typedef enum ta_e_custom_receipt_formatter_text_alignment ta_e_custom_receipt_formatter_text_alignment_t
 Custom receipt formatter text alignment.
 
typedef enum ta_e_custom_receipt_formatter_condition ta_e_custom_receipt_formatter_condition_t
 Custom receipt formatter condition.
 
typedef struct ta_s_custom_receipt_formatter_text_element ta_s_custom_receipt_formatter_text_element_t
 Custom receipt formatter text element definition. More...
 
typedef struct ta_s_custom_receipt_formatter_line_format ta_s_custom_receipt_formatter_line_format_t
 Custom receipt formatter line definition. More...
 
typedef struct ta_s_custom_receipt_formatter_configuration ta_s_custom_receipt_formatter_configuration_t
 Custom receipt formatter configuration. More...
 

Enumerations

enum  ta_e_custom_receipt_formatter_text_type {
  ta_c_crftt_text, ta_c_crftt_user_id, ta_c_crftt_pos_id, ta_c_crftt_transaction_type,
  ta_c_crftt_field_act_id, ta_c_crftt_field_acc_per, ta_c_crftt_field_acq_id, ta_c_crftt_field_aid,
  ta_c_crftt_field_amount, ta_c_crftt_field_amount_dcc, ta_c_crftt_field_amount_other, ta_c_crftt_field_auth_code,
  ta_c_crftt_field_brand_name, ta_c_crftt_field_currency, ta_c_crftt_field_currency_dcc, ta_c_crftt_field_dcc_disclaimer,
  ta_c_crftt_field_disclaimer, ta_c_crftt_field_exponent, ta_c_crftt_field_exponent_dcc, ta_c_crftt_field_markup_dcc,
  ta_c_crftt_field_markup_exponent_dcc, ta_c_crftt_field_card_number_printable_merchant, ta_c_crftt_field_card_number_printable_cardholder, ta_c_crftt_field_rate_dcc,
  ta_c_crftt_field_rate_exponent_dcc, ta_c_crftt_field_time_stamp_date, ta_c_crftt_field_time_stamp_time, ta_c_crftt_field_trm_id,
  ta_c_crftt_field_trx_ref_num, ta_c_crftt_field_trx_seq_cnt, ta_c_crftt_field_pos_entry_mode, ta_c_crftt_field_card_expiry_date,
  ta_c_crftt_field_card_number_enc, ta_c_crftt_field_amount_saldo, ta_c_crftt_field_ecr_seq_cnt, ta_c_crftt_field_number_of_installments,
  ta_c_crftt_field_installment_disclaimer, ta_c_crftt_field_tender_name, ta_c_crftt_field_tender_or_brand_name
}
 Custom receipt formatter text types. More...
 
enum  ta_e_custom_receipt_formatter_text_alignment { ta_c_crfta_left, ta_c_crfta_right, ta_c_crfta_center }
 Custom receipt formatter text alignment.
 
enum  ta_e_custom_receipt_formatter_condition {
  ta_crfc_none, ta_crfc_ecr_info, ta_crfc_eft_info, ta_crfc_signature,
  ta_crfc_has_values, ta_crfc_has_installment
}
 Custom receipt formatter condition.
 

Functions

ta_e_result_code_t ta_custom_receipt_formatter_create (ta_object_t *formatter, const ta_s_custom_receipt_formatter_configuration_t *configuration)
 Create custom receipt formatter. More...
 
ta_e_result_code_t ta_normal_receipt_formatter_create (ta_object_t *formatter)
 Create normal receipt format. More...
 
ta_e_result_code_t ta_compact_receipt_formatter_create (ta_object_t *formatter)
 Create compact receipt format. More...
 
ta_e_result_code_t ta_super_compact_receipt_formatter_create (ta_object_t *formatter)
 Create super compact receipt format. More...
 
ta_e_result_code_t ta_ultra_compact_receipt_formatter_create (ta_object_t *formatter)
 Create ultra compact receipt format. More...
 

Typedef Documentation

◆ ta_s_custom_receipt_formatter_configuration_t

Custom receipt formatter configuration.

Used by ta_custom_receipt_formatter_create to initialize formatter. After the object has been created the struct data is not required anymore.

◆ ta_s_custom_receipt_formatter_line_format_t

Custom receipt formatter line definition.

Contains array of text elements.

◆ ta_s_custom_receipt_formatter_text_element_t

Custom receipt formatter text element definition.

Can be static text or dynamic content. Used during construction of object.

Enumeration Type Documentation

◆ ta_e_custom_receipt_formatter_text_type

Custom receipt formatter text types.

Enumerator
ta_c_crftt_text 

Static text.

ta_c_crftt_user_id 

User identifier.

ta_c_crftt_pos_id 

POS identifier.

ta_c_crftt_transaction_type 

Transaction type.

ta_c_crftt_field_act_id 

ReceiptItemType.ACT_ID.

ta_c_crftt_field_acc_per 

ReceiptItemType.ACC_PER.

ta_c_crftt_field_acq_id 

ReceiptItemType.ACQ_ID.

ta_c_crftt_field_aid 

ReceiptItemType.AID.

ta_c_crftt_field_amount 

ReceiptItemType.AMOUNT.

ta_c_crftt_field_amount_dcc 

ReceiptItemType.AMOUNT_DCC.

ta_c_crftt_field_amount_other 

ReceiptItemType.AMOUNT_OTHER.

ta_c_crftt_field_auth_code 

ReceiptItemType.AUTH_CODE.

ta_c_crftt_field_brand_name 

ReceiptItemType.BRAND_NAME.

ta_c_crftt_field_currency 

ReceiptItemType.CURRENCY.

ta_c_crftt_field_currency_dcc 

ReceiptItemType.CURRENCY_DCC.

ta_c_crftt_field_dcc_disclaimer 

ReceiptItemType.DCC_DISCLAIMER.

ta_c_crftt_field_disclaimer 

ReceiptItemType.DISCLAIMER.

ta_c_crftt_field_exponent 

ReceiptItemType.EXPONENT.

ta_c_crftt_field_exponent_dcc 

ReceiptItemType.EXPONENT_DCC.

ta_c_crftt_field_markup_dcc 

ReceiptItemType.MARKUP_DCC.

ta_c_crftt_field_markup_exponent_dcc 

ReceiptItemType.MARKUP_EXPONENT_DCC.

ta_c_crftt_field_card_number_printable_merchant 

ReceiptItemType.CARD_NUMBER_PRINTABLE_MERCHANT.

ta_c_crftt_field_card_number_printable_cardholder 

ReceiptItemType.CARD_NUMBER_PRINTABLE_CARDHOLDER.

ta_c_crftt_field_rate_dcc 

ReceiptItemType.RATE_DCC.

ta_c_crftt_field_rate_exponent_dcc 

ReceiptItemType.RATE_EXPONENT_DCC.

ta_c_crftt_field_time_stamp_date 

ReceiptItemType.TIME_STAMP_DATE.

ta_c_crftt_field_time_stamp_time 

ReceiptItemType.TIME_STAMP_TIME.

ta_c_crftt_field_trm_id 

ReceiptItemType.TRM_ID.

ta_c_crftt_field_trx_ref_num 

ReceiptItemType.TRX_REF_NUM.

ta_c_crftt_field_trx_seq_cnt 

ReceiptItemType.TRX_SEQ_CNT.

ta_c_crftt_field_pos_entry_mode 

ReceiptItemType.POS_ENTRY_MODE entry mode.

ta_c_crftt_field_card_expiry_date 

ReceiptItemType.EXP_DATE entry mode.

ta_c_crftt_field_card_number_enc 

ReceiptItemType.CARD_NUMBER_ENCRYPTED entry mode.

ta_c_crftt_field_amount_saldo 

ReceiptItemType.SALDO.

ta_c_crftt_field_ecr_seq_cnt 

ReceiptItemType.ECR_SEQ_CNT.

ta_c_crftt_field_number_of_installments 

ReceiptItemType.NUMBER_OF_INSTALLMENTS.

ta_c_crftt_field_installment_disclaimer 

ReceiptItemType.INSTALLMENT_DISCLAIMER.

ta_c_crftt_field_tender_name 

ReceiptItemType.TENDER_NAME.

ta_c_crftt_field_tender_or_brand_name 

ReceiptItemType.TENDER_NAME or ReceiptItemType.BRAND_NAME.

Function Documentation

◆ ta_compact_receipt_formatter_create()

ta_e_result_code_t ta_compact_receipt_formatter_create ( ta_object_t formatter)

Create compact receipt format.

Formats transaction receipts using compact receipt format.

Caller retains a reference to the created instance. While assigning to a terminal instance the terminal instance retains the reference. The user can release the reference directly afterwards. In this case the formatter is destroyed once no terminal instance requires the formatter anymore.

Parameters
[out]formatterPointer to variable to write created object instance to. Created object instance is retained. Object is of type custom_receipt_formatter
Return values
ta_c_rc_okObject instance has been created and written to formatter.
ta_c_rc_invalid_argumentformatter is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_custom_receipt_formatter_create()

ta_e_result_code_t ta_custom_receipt_formatter_create ( ta_object_t formatter,
const ta_s_custom_receipt_formatter_configuration_t configuration 
)

Create custom receipt formatter.

Formats transaction receipts using string formating definition. The definition is required to be valid memory location only during construction time. The receipt formatted stores the information internally during construction time. After the object has been constructed the memory locations can become invalid.

Caller retains a reference to the created instance. While assigning to a terminal instance the terminal instance retains the reference. The user can release the reference directly afterwards. In this case the formatter is destroyed once no terminal instance requires the formatter anymore.

Parameters
[out]formatterPointer to variable to write created object instance to. Created object instance is retained.
[in]configurationPointer to struct containinig formatter configuration.
Return values
ta_c_rc_okObject instance has been created and written to formatter.
ta_c_rc_invalid_argumentformatter is null-pointer.
ta_c_rc_invalid_argumentconfiguration is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_normal_receipt_formatter_create()

ta_e_result_code_t ta_normal_receipt_formatter_create ( ta_object_t formatter)

Create normal receipt format.

Formats transaction receipts using normal receipt format.

Caller retains a reference to the created instance. While assigning to a terminal instance the terminal instance retains the reference. The user can release the reference directly afterwards. In this case the formatter is destroyed once no terminal instance requires the formatter anymore.

Parameters
[out]formatterPointer to variable to write created object instance to. Created object instance is retained. Object is of type custom_receipt_formatter
Return values
ta_c_rc_okObject instance has been created and written to formatter.
ta_c_rc_invalid_argumentformatter is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_super_compact_receipt_formatter_create()

ta_e_result_code_t ta_super_compact_receipt_formatter_create ( ta_object_t formatter)

Create super compact receipt format.

Formats transaction receipts using super compact receipt format.

Caller retains a reference to the created instance. While assigning to a terminal instance the terminal instance retains the reference. The user can release the reference directly afterwards. In this case the formatter is destroyed once no terminal instance requires the formatter anymore.

Parameters
[out]formatterPointer to variable to write created object instance to. Created object instance is retained. Object is of type custom_receipt_formatter
Return values
ta_c_rc_okObject instance has been created and written to formatter.
ta_c_rc_invalid_argumentformatter is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_ultra_compact_receipt_formatter_create()

ta_e_result_code_t ta_ultra_compact_receipt_formatter_create ( ta_object_t formatter)

Create ultra compact receipt format.

Formats transaction receipts using ultra compact receipt format.

Caller retains a reference to the created instance. While assigning to a terminal instance the terminal instance retains the reference. The user can release the reference directly afterwards. In this case the formatter is destroyed once no terminal instance requires the formatter anymore.

Parameters
[out]formatterPointer to variable to write created object instance to. Created object instance is retained. Object is of type custom_receipt_formatter
Return values
ta_c_rc_okObject instance has been created and written to formatter.
ta_c_rc_invalid_argumentformatter is null-pointer.
ta_c_rc_out_of_memoryFailed allocating memory.