Interface TransactionContext

All Known Subinterfaces:
MasterCardTransactionContext

public interface TransactionContext
Contains the different values of the current transaction.
This is used in PaymentServiceListener to provide information about the payment.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the AID that is used to perform the transaction.
    double
    Gets the transaction amount in ISO-4217 format.
    byte[]
    Gets the currency code of the transaction amount in BCD format.
    Gets the status of the DigitalizedCard that has been used for the transaction.
    byte[]
    Gets the raw transaction amount regardless of the currency used.
    Gets the scheme used for performing the card payment.
    byte[]
    Gets the date of the transaction in BCD Format.
    Gets the Transaction ID.
    byte
    Gets the transaction type (such as PURCHASE, REFUND, CASHBACK).
    void
    This method can be called to wipe the card transaction information after use.
  • Method Details

    • getAid

      String getAid()
      Retrieves the AID that is used to perform the transaction.
      Returns:
      The string of AID in hexadecimal value.
    • getAmount

      double getAmount()
      Gets the transaction amount in ISO-4217 format.
      Example:
      Based on ISO 4217, 'E' denotes how many values are present after decimal points for the currency. *For Japanese Yen, E = 0 indicates that there are no decimal values.
      Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x00
      Value = 5000
      *For Euro, IDR and Brazil Real, E =2 indicates that there are 2 values after the decimal points.
      Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x65
      Value = 50.65
      *For Joranian Dinar, E = 3 indicates that there are 3 values after decimal points.
      Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65
      Value = 56.65
      *For Unidad de Fomento, E = 4 indicates that there are 4 values after decimal points.
      Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65
      Value = 0.5665
      Returns:
      The floating point value of the transaction amount.
    • getRawAmount

      byte[] getRawAmount()
      Gets the raw transaction amount regardless of the currency used.
      Returns:
      The raw transaction amount from the POS Terminal as a byte array.
    • getCurrencyCode

      byte[] getCurrencyCode()
      Gets the currency code of the transaction amount in BCD format. Please refer to sample code in the Developer Guide section.
      Returns:
      The currency code in BCD format as a byte array .
    • getTrxDate

      byte[] getTrxDate()
      Gets the date of the transaction in BCD Format.
      Returns:
      The 3-byte array transaction date (year,month,day) in BCD format.
    • getTrxType

      byte getTrxType()
      Gets the transaction type (such as PURCHASE, REFUND, CASHBACK). This depends on the payment scheme used. Typically, it follows the EMV specification. The possible hexadecimal values according to the specifications are:
      0x00 for Purchase,
      0x01 for Withdrawal (manual cash transactions),
      0x02 for Debit Adjustment (for future use),
      0x17 for Cash Disbursement,
      0x20 for Refund/Correction,
      0x23 Credit Adjustment,
      0x30 Balance Enquiry,
      0x40 Account Transfer
      Normally it should be either 0x00 or 0x20 for Mobile Wallet use cases. Please refer to the sample code in the "Transaction Context" section of the Developer Guide for converting this into String format.
      Returns:
      The byte of transaction type.
    • getDigitalizedCardStatus

      DigitalizedCardStatus getDigitalizedCardStatus()
      Gets the status of the DigitalizedCard that has been used for the transaction. It is recommended to look at the card status to see if a pull-mode replenishment is needed.
      Returns:
      DigitalizedCardStatus status of the card.
    • getTrxId

      String getTrxId()
      Gets the Transaction ID.
      Returns:
      A unique ID for identifying the transaction.
    • wipe

      void wipe()
      This method can be called to wipe the card transaction information after use. after use.
      For safety reason, it is recommended to wipe the transaction context immediately after use.
    • getScheme

      CardScheme getScheme()
      Gets the scheme used for performing the card payment.
      Returns:
      The CardScheme scheme of the card.