set Transaction Params
Sets transaction parameters required for EMV transaction processing.
This method configures the EMV kernel with essential transaction parameters that will be used throughout the transaction flow. These parameters include transaction amounts, currency codes, transaction types, and other EMV-specific data elements required for proper transaction processing.
Prerequisites:
Threre is no prerequisites for setting transaction parameters.
Usage requirement: This method should be called before invoking startTransaction to ensure all necessary transaction parameters are properly configured in the kernel.
Typical parameters configured:
Transaction amount: Primary transaction amount in cents (sAmount)
Cashback amount: Additional cashback amount if applicable (sCashback)
Transaction date: Date in YYMMDD format (sDate)
Transaction time: Time in HHMMSS format (sTime)
Contactless enablement: Flag to enable/disable contactless processing (blCtlsEnable)
Transaction type: EMV transaction type code (sTransactionType)
Timeout configuration: Custom timeout for card detection operations (lSpecificTimeout)
Required TLV tags: Specific EMV tags to be retrieved during transaction (sRequiredTLV)
Forced EMV tags: Additional EMV tags to be forcibly included in processing (sForcedEMVTags)
Thread safety: This method should be called from the main transaction thread. Concurrent calls may result in parameter conflicts or undefined behavior.
Exceptions: This function MUST NOT throw any exception. Any error must be indicated through NexusRet Any unexpected error must be mapped as NexusRet.INTERR
Return
NexusRet.OK: Transaction parameters set successfully.
Other: Error setting transaction parameters.
Example usage:
val transactionParams = TypeInputStartTransaction(
sAmount = "000000001000", // $10.00 in cents
sCashback = "000000000000", // No cashback
sDate = "250101", // January 1, 2025 (YYMMDD)
sTime = "143000", // 14:30:00 (HHMMSS)
blCtlsEnable = true, // Enable contactless
sTransactionType = "00", // Purchase transaction
lSpecificTimeout = 30000L, // 30 seconds timeout
sRequiredTLV = "5F2A9F02", // Currency code and amount tags
sForcedEMVTags = "" // No forced tags
)
emvPort.setTransactionParams(transactionParams)
// Now ready to start transaction
val cardType = emvPort.startTransaction()Parameters
A TypeInputStartTransaction object containing all necessary transaction parameters and EMV data elements required for the transaction. This includes amounts, currency codes, transaction type, and any additional TLV data needed for the specific transaction context.