question

jim-patel avatar image
jim-patel asked jim-patel commented

Orders held in Register paid with Custom Tender

I am having an issue with the way the Register app currently works and am wondering if there is a workaround or some workflow that I'm not doing correctly.

Some time this year, an update was made to the Register app that makes it remember an in-process order so you can go back to it. Previous to the update, if you used the Intents.ACTIONSTARTREGISTER intent to open the register then it would open a new order if you didn't pass in Intents.EXTRACLOVERORDER_ID or the specific order you want to open if you do and it would forget about that original order. Now, if you hit the Back button enough times you get back to that order.

The issue is that my app is applying a payment using its custom tender to the order. I'm doing this via the REST API as I am currently unaware of a way to do this using the Java API. The thing is, the Register isn't aware of this payment, so it's waiting for a payment from the user on its Payments screen. The order is Paid, but you can still apply a payment to it, say Cash or swipe a Credit Card. This applies multiple payments to the order, but does finish up the order.

Is there a way to make the Register stop remembering an order once I've applied a payment to it?

Orders
10 |2000

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

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered jim-patel commented

The way a custom tender is supposed to work is that you return success, and an amount, and Clover creates, and applies a payment to the order. If you are adding a payment using the REST API within your custom tender, that's not good. The Clover device isn't going to see the payment until the device syncs which could be minutes or longer.

Is this app in production? If so we'd want to do something about that ASAP.

3 comments
10 |2000

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

jim-patel avatar image jim-patel commented ·

How do you return success and an amount and Clover creates and applies a payment to the order? I tried previously to figure out how to do this, primarily with the OrderConnector functions addPayment and pay, and was unsuccessful. Thus I use the REST API to apply the payment with the custom tender.

This app is currently in development.

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

Start by reading the docs for ACTION_MERCHANT_TENDERin the Clover Android SDK. It links to an example app. https://github.com/clover/clover-andr...

0 Likes 0 ·
jim-patel avatar image jim-patel commented ·

Thank you, that was exactly what I needed.

0 Likes 0 ·

Welcome to the
Clover Developer Community