The reprint interface is used to print the receipt of a specific transaction again after it has been completed. It’s typically used when the original receipt is lost, printing fails, or a duplicate copy is needed.
The caller can initiate a reprint request using the original transaction's orgTransactionReference. Once the request is received, the payment terminal will regenerate and print the receipt.
Global reference of the original sale transaction for the sale system.
Destination of the message.
Unique identification of the partner that is the recipient of the message exchange.
For example, the POS SN
Result of the requested transaction.
Detail of the response.
Additional information to be logged for further examination.
When you receive the terminal result through the SDK callback interface and ReprintResult.response = SUCC, you can obtain the printed receipt content.
Customer or Merchant payment receipt.
Detailed amounts associated with the total amount of transaction.
Destination of the message.
Content or reference of the message.
Maximum number of characters allowed is 20000.
List<DocumentType7Code> documentType7CodeList = new ArrayList<>(Arrays.asList(DocumentType7Code.JNRL, DocumentType7Code.CRCP,DocumentType7Code.HRCP));
ReprintParam reprintParam = ReprintParam.newBuilder()
.orgTransactionReference(lastPaymentResult.getTransactionReference())
.documentQualifier(documentType7CodeList)
.build();
RetailerManager.getInstance().provideSystemService().newReprintStatusExchange(reprintParam)
.startAsyncExchange(new Exchange.RetailerSDKCallback<ReprintResult>() {
@Override
public void onResult(ReprintResult result) {
showRecieveMsg("Reprint Result:" + GsonUtils.toJson(result));
}
@Override
public void onError(int errCode, String errMsg) {
showRecieveMsg("Reprint error,errCode:" + errCode + ",errMsg:" + errMsg);
}
});