Skip to content

Instantly share code, notes, and snippets.

@hpkaushik121
Created May 30, 2023 18:47
Show Gist options
  • Save hpkaushik121/7b3bcf99ff4120bdbeabf331b3b63528 to your computer and use it in GitHub Desktop.
Save hpkaushik121/7b3bcf99ff4120bdbeabf331b3b63528 to your computer and use it in GitHub Desktop.
/*
*
* Case 4s C-APDU
*/
public static byte[] getProcessingOpts(DOL pdol, EMVApplication app) {
String command;
if (pdol != null && pdol.getTagAndLengthList().size() > 0) {
byte[] pdolResponseData = EMVTerminal.constructDOLResponse(pdol, app);
command = "80 A8 00 00";
command += " " + Util.int2Hex(pdolResponseData.length + 2) + " 83 " + Util.int2Hex(pdolResponseData.length); //this PDOL get be fetch from response of SELECT command
command += " " + Util.prettyPrintHexNoWrap(pdolResponseData);
command += " 00"; // Le
} else {
command = "80 A8 00 00 02 83 00 00"; //Last 00 is Le
}
return Util.fromHexString(command);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment