Class SubTransaction


  • public class SubTransaction
    extends Object
    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.
    • Constructor Detail

      • SubTransaction

        public SubTransaction()
        Create SubTransaction.
      • SubTransaction

        public SubTransaction​(com.six.timapi.internal.TimSavedState savedState)
        For internal use only.
    • Method Detail

      • getAmount

        public Amount getAmount()

        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.

      • setAmount

        public void setAmount​(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 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.

      • getRate

        public Long getRate()

        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.

      • setRate

        public void setRate​(Long rate)

        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.

      • getRateExponent

        public Long getRateExponent()

        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.

      • setRateExponent

        public void setRateExponent​(Long rateExponent)

        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.

      • getFunction

        public TransactionType getFunction()
        Transaction function. Allowed are: PURCHASE, GIRO, CASH_ADVANCE.
      • setFunction

        public void setFunction​(TransactionType function)
        Transaction function. Allowed are: PURCHASE, GIRO, CASH_ADVANCE.
      • toString

        public String toString()
        String representation for debugging purpose.
        Overrides:
        toString in class Object
      • createSavedState

        public com.six.timapi.internal.TimSavedState createSavedState()
        For internal use only.