question

sanjay avatar image
sanjay asked ·

Need to print the receipt (merchant copy and customer copy both) on a single click of print button

Hi @


I am using Clover android SDK. I want to implement the functionality to print the receipt (merchant copy and customer copy both) on the click of the print button. We are using the following code to print the receipt:


For Card payment:

printJob = new StaticPaymentPrintJob.Builder().paymentId(mPayment.getId()).order(mOrder).build

printJob.print(mApplicationContext, account);


For Cash payment:

printJob = new StaticPaymentPrintJob.Builder().order(mOrder).build();

printJob.print(mApplicationContext, account);


When we clicked on the "Print" button, only one receipt got printed. While we have required to print two copies (Merchant copy and customer copy) on a single click. Please suggest a way to achieve it. Is there any configuration from the clover side to achieve that?


Thanks.

PaymentsClover MiniClover Android SDKPrintClover Flex
2 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Which doesn't print? Do they both print okay individually? E..g., if you comment the code to print A, print, then comment the code to print B, and print, do they both print okay?

There's no trick. Each print job is independent.

0 Likes 0 · ·
sanjay avatar image sanjay Jeffrey Blattman ♦♦ ·

Actually I want that I use printJob.print(context, account); only one time and the printer should print the two copies of the receipt in which one copy will have the message "Merchant copy" below the bar code at the bottom of the receipt. Is it possible?

0 Likes 0 · ·

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·
Actually I want that I use printJob.print(context, account); only one time and the printer should print the two copies of the receipt in which one copy will have the message "Merchant copy" below the bar code at the bottom of the receipt. Is it possible?

There's one case where this happens... if there's a payment, and the merchant is configured to accept signatures on paper (not typical), AND you do not set either FLAG_CUSTOMER or FLAG_MERCHANT).

If you want this behavior, I'd just send two print jobs. Not clear to me why you are trying to avoid that.

Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community