question

ramya avatar image
ramya asked Raymond Lee Deactivated commented

Stop Print from Register App When Setup has Settings "Fire when hitting pay and Print When hitting Pay"

In Our app we are giving automatic print whenever order placed

If below settings given
Fire When hitting Pay and Print When hitting Pay
if order is paid online, printer fires.- working fine
if order is not paid online, printer fires from our side.
Restaurant accepts payment from Register app , printer fires again from registser app.

What we need to fix is
if order is not paid online, printer fires from our side. Restaurant accepts payment from register app, clover recognizes that order has already printed so it should not print again from register app or requires manager override to print again.

Can you please help, How to stop reprinting from register app when payment done through clover.
Print
10 |2000

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

Raymond Lee avatar image
Raymond Lee Deactivated answered
Hi @Ramya,

Merchants can choose to require Manager passcode when reprinting an order receipt, they need to go to: Setup -> Order Receipts -> Reprinting order receipt requires manager Passcode.

In order for this to work, you will need to mark one or more line items in the order as "printed", after you have printed the order receipt.

Here is an example on how to mark all line items of an order as printed after printing, through android SDK:
OrderConnector mOrderConnector = new OrderConnector(getApplicationContext(), mAccount, null);

// Retrieve the order to print
Order order = mOrderConnector.getOrder("D8E7P04RKB60E");

// Print order receipt for order
new StaticOrderPrintJob.Builder().order(order).build().print(getApplicationContext(), mAccount);

// Get the line items for the order
List<LineItem> lineItems = order.getLineItems();

// Set all line items as printed
for (LineItem lineItem : lineItems) {
    lineItem.setPrinted(true);
}

// Update the order with the updated line items
mOrderConnector.updateLineItems("D8E7P04RKB60E", lineItems);

You can also do so through the REST API by a POST request to each line item of the order:
/v3/merchants/{
                {merchantId}}/orders/{
                {orderId}}/line_items/{
                {lineItemId}}
with the following body:
 {
    "printed": true
 }

Hope that helps,

Raymond
10 |2000

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

ramya avatar image
ramya answered Raymond Lee Deactivated commented
Thanks Raymond, It worked fine.
1 comment
10 |2000

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

Raymond Lee avatar image Raymond Lee commented ·

Glad to hear, thanks for the followup!

0 Likes 0 ·

Welcome to the
Clover Developer Community