'Z3' is the correct response code when the terminal is unable to go online, but sometimes 'Z3' shows up in tag 8A when it's not expected. Why?
Basically, if you send a result code to the reader that is not recognized by the kernel, the kernel will change it to 'Z3' (5A33). For example: the kernel may not be recognizing result code 3035. Instead, it gets changed to 5A33 ('Z3').
Solution: You can use tag DFEE1B to define your three response codes: Approved/Referral/Decline.
DFEE1B is defined as 8 bytes long:
- Bytes 0/1 are for Approved Code
- Bytes 2/3 are for Referral Code
- Bytes 4/5 are for Declined Code
- Bytes 6/7 are Reserved for Future Use (RFU).
Example: If the host uses 3030 as APPROVED, 3031 as REFERRAL, and 3035 as DECLINED, you would make sure the following TLV is included in your terminal settings:
DFEE1B 08 3030 3031 3035 0000
Once DFEE1B is properly defined with the DECLINE = 3035, then the kernel will recognize and properly process the transaction.
NOTE: To set the tag on a per-transaction basis, you can send DFEE1B in the emv_completeTransaction() method, in the Universal SDK, or provide DFEE1B in the "extra tags" of the Complete Transaction parameters in the Universal Demo app.