Void Transactions
Programmatic void
Voids a transaction silently by UTI. Printing of the void receipt is suppressed by default; set DISABLE_PRINTING = "false" to print.
HashMap<String, String> params = new HashMap<>(); params.put(Parameters.DISABLE_PRINTING, "false"); params.put(Parameters.REFERENCE_ID, "void-ref-001"); Api.voidTransaction(context, uti, params);
Response: VOID_RESULT_ACTION
case Messages.VOID_RESULT_ACTION: {
boolean success = intent.getBooleanExtra(Messages.VOID_RESULT, false);
String uti = intent.getStringExtra(Messages.TRANSACTION_UTI);
break;
}
Void list UI
Shows the list of voidable transactions for the operator to select from. A transaction is voidable if it is less than a day old and has not already been voided.
Api.showVoidList(context); // With locale override HashMap<String, String> params = new HashMap<>(); params.put(Parameters.LOCALE, "is_IS"); Api.showVoidList(context, params);