SubTransaction

public class SubTransaction : CustomStringConvertible

A SubTransaction is a part of an overall transaction. Only useful in context of Swiss Post Combined transaction type. Designed to mimic the EP2 7.2. Product Record of type Record Subtrx. Specification: banking.

  • Create SubTransaction.

    Declaration

    Swift

    public init()
  • 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 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 10000 field on SIXml to the terminal in the transaction request and the terminal sends this amount as 10000 (=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 8000 (= 80 CHF) in the authorization response to the terminal. The terminal then must return the actually approved amount back to the ECR, 8000

    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: 10000 This is CHF 100.00

    Example: -10000 This is CHF -100.00

    Specification: banking.

    Declaration

    Swift

    public var amount: Amount?
  • DCC excange rate.

    The DCC amount (sixml:AmuntDcc) will be calculated as follows: transaction amount (sixml:Amount) / DCC rate (sixml:Rate).

    Example: 2000 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.

    Declaration

    Swift

    public var rate: Int64?
  • Specifies the exponent of the dcc exchange rate.

    This field is handled like all other Exponent fields. see for more information.

    Optional: Mandatory if

    Specification: banking.

    Declaration

    Swift

    public var rateExponent: Int64?
  • Transaction function. Allowed are: PURCHASE, GIRO, CASH_ADVANCE.

    Declaration

    Swift

    public private(set) var function: CTransactionType { get }
  • Declaration

    Swift

    public func setFunction(function: CTransactionType) throws
  • Textual representation.

    Declaration

    Swift

    public var description: String { get }