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 enum ta_e_custom_receipt_formatter_translated_text ta_e_custom_receipt_formatter_translated_text_t
 Custom receipt formatter translated text.
 
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_dashed_line, ta_c_crftt_receipt_header, 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, ta_c_crftt_field_markup_dcc_regulated, ta_c_crftt_field_markup_exponent_dcc_regulated, ta_c_crftt_field_rate_dcc_regulated,
  ta_c_crftt_field_rate_exponent_dcc_regulated, ta_c_crftt_field_original_trans_ref, ta_c_crftt_field_key_pan_receipt_index, ta_c_crftt_field_pan_receipt_dol_index,
  ta_c_crftt_field_amount_installment_fee, ta_c_crftt_field_amount_installment_first, ta_c_crftt_field_amount_installment_one, ta_c_crftt_field_amount_installment_total,
  ta_c_crftt_field_amount_reservation, ta_c_crftt_field_amount_tip, ta_c_crftt_field_auth_reslt, ta_c_crftt_field_auth_resp_c,
  ta_c_crftt_field_auth_resp_text_c, ta_c_crftt_field_clerk_identifier, ta_c_crftt_field_fuel_dispenser_number, ta_c_crftt_field_interest_installment,
  ta_c_crftt_field_merchant_tid, ta_c_crftt_field_multi_account_index, ta_c_crftt_field_multi_contract_index, ta_c_crftt_field_original_aid,
  ta_c_crftt_field_original_brand_name, ta_c_crftt_field_original_card_country_code, ta_c_crftt_field_original_card_number_printable, ta_c_crftt_field_original_tender_name,
  ta_c_crftt_field_posdnumber, ta_c_crftt_field_pan_receipt_dol, ta_c_crftt_field_pre_authorization_exp_date, ta_c_crftt_field_receipt_number,
  ta_c_crftt_field_shift_number
}
 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, ta_crfc_dcc
}
 Custom receipt formatter condition.
 
enum  ta_e_custom_receipt_formatter_translated_text {
  ta_crftt_undefined, ta_crftt_trx_type_credit, ta_crftt_trx_type_purchase, ta_crftt_trx_type_reversal,
  ta_crftt_attendant_id, ta_crftt_ecr_id, ta_crftt_ecr_seq, ta_crftt_trm_id,
  ta_crftt_act_id, ta_crftt_aid, ta_crftt_trx_seq_cnt, ta_crftt_trx_curr,
  ta_crftt_local_curr, ta_crftt_rate, ta_crftt_installment_payment, ta_crftt_no_installments,
  ta_crftt_trx_ref_no, ta_crftt_auth_code, ta_crftt_total_eft, ta_crftt_cardholder,
  ta_crftt_merchant, ta_crftt_saldo, ta_crftt_att_ecr_id_seq, ta_crftt_eft_ref_no,
  ta_crftt_expiration_date, ta_crftt_exp, ta_crftt_trm_act_id, ta_crftt_seq_ref_auth,
  ta_crftt_epf, ta_crftt_seq_aut
}
 Custom receipt formatter translated text.
 

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_dashed_line 

Underline running across the entire line.

ta_c_crftt_receipt_header 

Header if available (requires calling Terminal.SystemInformationAsync() first.

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.

ta_c_crftt_field_markup_dcc_regulated 

ReceiptItemType.MARKUP_DCC.

ta_c_crftt_field_markup_exponent_dcc_regulated 

ReceiptItemType.MARKUP_EXPONENT_DCC.

ta_c_crftt_field_rate_dcc_regulated 

ReceiptItemType.RATE_DCC.

ta_c_crftt_field_rate_exponent_dcc_regulated 

ReceiptItemType.RATE_EXPONENT_DCC.

ta_c_crftt_field_original_trans_ref 

ReceiptItemType.ORIGINAL_TRANS_REF.

ta_c_crftt_field_key_pan_receipt_index 

ReceiptItemType.KEY_PAN_RECEIPT_INDEX.

ta_c_crftt_field_pan_receipt_dol_index 

ReceiptItemType.FIELD_PAN_RECEIPT_DOL_INDEX.

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.