question

Sukhbir Singh avatar image
Sukhbir Singh asked Jeffrey Blattman commented

How to open the Pay with Cash screen (see attachment) using intents?

cashpayment.png
cashpayment.png (51.9 KiB)
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 Jeffrey Blattman commented
It's not possible to open that screen directly. You can open the main payments screen with ACTION_CLOVER_PAY. The employee will need to pick the tender type from there of course.

To get the result (success / fail) of the payment, start the activity for result and inspect the result code. To know details of the payment (such as the tender type), load the order for which the payment was made. It will have a payment object to understand those things.
6 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.

Sukhbir Singh avatar image Sukhbir Singh commented ·

Thanks,

But when we open the main payments screen using ACTION_CLOVER_PAY and send the amount its not display that amount and after clicking on "pay cash" button its goes to receipt screen and we didn't get response in OnActivityResult.

But, my requirement is that we want to skip the default receipt screen and get the response in OnActivityResult after successfully cash payment, please let me know if it possible.

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

ACTION_CLOVER_PAY is as documented in the SDK: is does not accept an amount. You need to create an order, then pass it that order ID. Yes, it goes to the receipt screen after payment is complete. You can't skip that.

The Payments Clover app is pretty much a black box. You can start it, but the flow is not customizable.

0 Likes 0 ·
Sukhbir Singh avatar image Sukhbir Singh commented ·
how to get callback after successfully payment done by using ACTION_CLOVER_PAY and also how to identify payment mode for card or cash.
0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ Sukhbir Singh commented ·

See updated answer.

0 Likes 0 ·
Sukhbir Singh avatar image Sukhbir Singh commented ·
Thanks,
But when we make cash payment using ACTION_CLOVER_PAY and then we open default Transaction app inside that amount is always display zero.
0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ Sukhbir Singh commented ·

The Payments app that's started with ACTION_CLOVER_PAY accepts an order ID parameter. The total is the total of that order. You must add line items to the order user OrderConnector before calling ACTION_CLOVER_PAY.

0 Likes 0 ·

Welcome to the
Clover Developer Community