Interface TransactionContext
-
- All Known Subinterfaces:
MasterCardTransactionContext
public interface TransactionContext
It contains the different value of the current transaction.
It will be used inPaymentServiceListener
to provide information for the payment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAid()
Retrieve the AID that was used to perform the transaction.double
getAmount()
Get the amount of the transaction according to the currency used based on ISO-4217 Example : Based on ISO 4217 - 'E' denotes how many values are present after decimal points for that currency Japanese Yen - E = 0 - No decimal values Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x00 Value = 5000 Euro, IDR and Brazil Real - E =2 - 2 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x65 Value = 50.65 Joranian Dinar - E = 3 - 3 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65 Value = 56.65 Unidad de Fomento - E = 4 - 4 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65 Value = 0.5665byte[]
getCurrencyCode()
Get the currency of the transaction in BCD format.Please refer to sample code in developer guide section "Transaction Context" for converting this into String formatDigitalizedCardStatus
getDigitalizedCardStatus()
Get the status of theDigitalizedCard
that has been used for the transaction.byte[]
getRawAmount()
Get the raw amount of the transaction regardless of currencyCardScheme
getScheme()
Call this method for retrieving the Scheme of the Card used for performing the paymentbyte[]
getTrxDate()
Get the date of the transaction in BCD format.byte
getTrxType()
Get the transaction type (such as PURCHASE, REFUND, CASH-BACK).void
wipe()
Call this method for securely wiping the card transaction information after use.
-
-
-
Method Detail
-
getAid
java.lang.String getAid()
Retrieve the AID that was used to perform the transaction.- Returns:
- Hex string of AID
-
getAmount
double getAmount()
Get the amount of the transaction according to the currency used based on ISO-4217 Example : Based on ISO 4217 - 'E' denotes how many values are present after decimal points for that currency Japanese Yen - E = 0 - No decimal values Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x00 Value = 5000 Euro, IDR and Brazil Real - E =2 - 2 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x50, 0x65 Value = 50.65 Joranian Dinar - E = 3 - 3 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65 Value = 56.65 Unidad de Fomento - E = 4 - 4 values after decimal points Raw Value (getRawAmount) = 0x00, 0x00, 0x00, 0x00, 0x56, 0x65 Value = 0.5665- Returns:
- Floating point value of transaction amount.
-
getRawAmount
byte[] getRawAmount()
Get the raw amount of the transaction regardless of currency- Returns:
- byte Array raw value from the PO
-
getCurrencyCode
byte[] getCurrencyCode()
Get the currency of the transaction in BCD format.Please refer to sample code in developer guide section "Transaction Context" for converting this into String format- Returns:
- BCD-format ISO-4217 byte array.
-
getTrxDate
byte[] getTrxDate()
Get the date of the transaction in BCD format. Please refer to sample code in developer guide section "Transaction Context" for converting this into String format- Returns:
- BCD-format 3-byte transaction date (year,month,day)
-
getTrxType
byte getTrxType()
Get the transaction type (such as PURCHASE, REFUND, CASH-BACK). This depends on the payment scheme used, which in most cases follow the EMV specification. The possible hexa decimal values according to 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 usecases. Please refer to sample code in developer guide section "Transaction Context" for converting this into String format- Returns:
- The byte of transaction type.
-
getDigitalizedCardStatus
DigitalizedCardStatus getDigitalizedCardStatus()
Get the status of theDigitalizedCard
that has been used for the transaction. It's good to look at the card status to see if a pull-mode replenishment is needed.- Returns:
DigitalizedCardStatus
status of the card.
-
wipe
void wipe()
Call this method for securely wiping the card transaction information after use.
For safety reason,it is good to wipe the transaction context immediately after use.
-
getScheme
CardScheme getScheme()
Call this method for retrieving the Scheme of the Card used for performing the payment- Returns:
CardScheme
Scheme of the card.
-
-