TIM SDK
TIM API C
|
|
Sub transaction.
Object type sub_transaction.
ta_e_result_code_t ta_sub_transaction_copy | ( | ta_object_t * | sub_transaction, |
const ta_object_t * | source_sub_transaction | ||
) |
Create copy of sub transaction.
[out] | sub_transaction | Pointer to variable to write created object instance to. Created object instance is retained. |
[in] | source_sub_transaction | Object of type sub_transaction to create copy of. |
ta_c_rc_ok | Object instance has been created and written to sub_transaction. |
ta_c_rc_invalid_argument | sub_transaction is null-pointer. |
ta_c_rc_invalid_argument | source_sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | source_sub_transaction is not of type sub_transaction. |
ta_c_rc_out_of_memory | Failed allocating memory. |
ta_e_result_code_t ta_sub_transaction_create | ( | ta_object_t * | sub_transaction | ) |
Create sub transaction.
[out] | sub_transaction | Pointer to variable to write created object instance to. Created object instance is retained. |
ta_c_rc_ok | Object instance has been created and written to sub_transaction. |
ta_c_rc_invalid_argument | sub_transaction is null-pointer. |
ta_c_rc_out_of_memory | Failed allocating memory. |
ta_e_result_code_t ta_sub_transaction_get_amount | ( | ta_object_t | sub_transaction, |
ta_object_t * | amount | ||
) |
Amount.
In a request defines the original amount for the transaction (given by ECR), in response the final authorized amount (given by host) in minor units.
In a transaction request this field defines the amount in minor units that shall be authorized for this transaction.
In a transcation response this field defines the amount in minor units that has actually been authorized. If the full amount has been authorized as sent in the transaction request, the value of the <sixml:Amount> field in the request and the response is equal.
PartialApproval: If the transaction has been approved only partially by the aquiring host, the terminal must return on SIXml the actual authorized amount that has been returned from host to terminal in the authorization response.
Example for ep2: The ECR sends an <sixml:Amount>10000</sixml:Amount> field on SIXml to the terminal in the transaction request and the terminal sends this amount as <ep2:AmtAuth>10000</ep2:AmtAuth> (=100 CHF) in the authorization request to the ep2 aquiring host. The host then only can partially approve the transaction and returns the partial approval amount <ep2:AmtAuth>8000</ep2:AmtAuth> (= 80 CHF) in the authorization response to the terminal. The terminal then must return the actually approved amount back to the ECR, <sixml:Amount Currency='CHF' Exponent='2'>8000</sixml:Amount>
The amount is additionally defined by the corresponding sixml:Currency and sixml:Exponent attributes. An amount can have a negative value, e.g. in case of returning a gas canister.
Example: <sixml:Amount Currency='CHF' Exponent='2'>10000</sixml:Amount> This is CHF 100.00 Example: <sixml:Amount Currency='CHF' Exponent='2'>-10000</sixml:Amount> This is CHF -100.00 Specification: banking.
[in] | sub_transaction | Object instance of type sub_transaction. |
[out] | amount | Pointer to variable to write object instance to. Object instance is of type amount and is not retained. Object instance is ta_invalid_object if value is not set in sub_transaction. |
ta_c_rc_ok | Object instance written to amount. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_c_rc_invalid_argument | amount is null-pointer. |
ta_e_result_code_t ta_sub_transaction_get_function | ( | ta_object_t | sub_transaction, |
ta_e_transaction_type_t * | function | ||
) |
Transaction function. Allowed are: purchase, giro, cash_advance.
Available if Banking guide is enabled.
[in] | sub_transaction | Object instance of type sub_transaction. |
[out] | function | Pointer to variable to write value to. Value is ta_c_tt_undefined if value is not set in sub_transaction. |
ta_c_rc_ok | Value written to function. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_c_rc_invalid_argument | function is null-pointer. |
ta_e_result_code_t ta_sub_transaction_get_rate | ( | ta_object_t | sub_transaction, |
int * | rate | ||
) |
DCC excange rate.
The DCC amount (sixml:AmuntDcc) will be calculated as follows: transaction amount (sixml:Amount) / DCC rate (sixml:Rate).
Example: <sixml:Amount Currency="EUR" Exponent="2">2000</sixml:Amount> and the DCC currency is "CHF", the sixml:Rate="8623328" and sixml:RateExponent="7" => 20.00 EUR / 0.8623328 => 23.19 CHF
Optional: Only in multi currency situations Specification: banking.
[in] | sub_transaction | Object instance of type sub_transaction. |
[out] | rate | Pointer to variable to write value to. |
ta_c_rc_ok | Object instance written to rate. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_c_rc_invalid_argument | rate is null-pointer. |
ta_e_result_code_t ta_sub_transaction_get_rate_exponent | ( | ta_object_t | sub_transaction, |
int * | rate_exponent | ||
) |
DCC excange rate exponent.
[in] | sub_transaction | Object instance of type sub_transaction. |
[out] | rate_exponent | Pointer to variable to write value to. |
ta_c_rc_ok | Object instance written to rate. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_c_rc_invalid_argument | rate_exponent is null-pointer. |
ta_e_result_code_t ta_sub_transaction_set_amount | ( | ta_object_t | sub_transaction, |
ta_object_t | amount | ||
) |
Amount.
In a request defines the original amount for the transaction (given by ECR), in response the final authorized amount (given by host) in minor units.
In a transaction request this field defines the amount in minor units that shall be authorized for this transaction.
In a transcation response this field defines the amount in minor units that has actually been authorized. If the full amount has been authorized as sent in the transaction request, the value of the <sixml:Amount> field in the request and the response is equal.
PartialApproval: If the transaction has been approved only partially by the aquiring host, the terminal must return on SIXml the actual authorized amount that has been returned from host to terminal in the authorization response.
Example for ep2: The ECR sends an <sixml:Amount>10000</sixml:Amount> field on SIXml to the terminal in the transaction request and the terminal sends this amount as <ep2:AmtAuth>10000</ep2:AmtAuth> (=100 CHF) in the authorization request to the ep2 aquiring host. The host then only can partially approve the transaction and returns the partial approval amount <ep2:AmtAuth>8000</ep2:AmtAuth> (= 80 CHF) in the authorization response to the terminal. The terminal then must return the actually approved amount back to the ECR, <sixml:Amount Currency='CHF' Exponent='2'>8000</sixml:Amount>
The amount is additionally defined by the corresponding sixml:Currency and sixml:Exponent attributes. An amount can have a negative value, e.g. in case of returning a gas canister.
Example: <sixml:Amount Currency='CHF' Exponent='2'>10000</sixml:Amount> This is CHF 100.00 Example: <sixml:Amount Currency='CHF' Exponent='2'>-10000</sixml:Amount> This is CHF -100.00 Specification: banking.
[in] | sub_transaction | Object instance of type sub_transaction. |
[in] | amount | Object instance to set. Object instance can be ta_invalid_object to clear the value in sub_transaction. If object instance is not ta_invalid_object is has to be of type amount. |
ta_c_rc_ok | Object instance assigned to sub_transaction. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_c_rc_invalid_argument | amount is not ta_invalid_object and is not of type amount. |
ta_e_result_code_t ta_sub_transaction_set_function | ( | ta_object_t | sub_transaction, |
ta_e_transaction_type_t | function | ||
) |
Transaction function. Allowed are: purchase, giro, cash_advance.
Available if Banking guide is enabled.
[in] | sub_transaction | Object instance of type sub_transaction. |
[in] | function | Value to set. Value can be ta_c_tt_undefined to clear the value in sub_transaction. |
ta_c_rc_ok | Value assigned to sub_transaction. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_c_rc_invalid_argument | function is null-pointer. |
ta_c_rc_invalid_argument | function is not purchase, giro or cash_advance. |
ta_e_result_code_t ta_sub_transaction_set_rate | ( | ta_object_t | sub_transaction, |
int | rate | ||
) |
DCC excange rate.
The DCC amount (sixml:AmuntDcc) will be calculated as follows: transaction amount (sixml:Amount) / DCC rate (sixml:Rate).
Example: <sixml:Amount Currency="EUR" Exponent="2">2000</sixml:Amount> and the DCC currency is "CHF", the sixml:Rate="8623328" and sixml:RateExponent="7" => 20.00 EUR / 0.8623328 => 23.19 CHF
Optional: Only in multi currency situations Specification: banking.
[in] | sub_transaction | Object instance of type sub_transaction. |
[in] | rate | Value to set. |
ta_c_rc_ok | Object instance assigned to sub_transaction. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |
ta_e_result_code_t ta_sub_transaction_set_rate_exponent | ( | ta_object_t | sub_transaction, |
int | rate_exponent | ||
) |
DCC excange rate exponent.
[in] | sub_transaction | Object instance of type sub_transaction. |
[in] | rate_exponent | Value to set |
ta_c_rc_ok | Object instance assigned to sub_transaction. |
ta_c_rc_invalid_argument | sub_transaction is ta_invalid_object. |
ta_c_rc_invalid_argument | sub_transaction is not of type sub_transaction. |