question

ramu avatar image
ramu asked David Marginian edited

Need to open Payment Receipt Option Screen programmatically after payment success in our custom app

Hi,

We want to open the print receipt screen after payment success in our custom app as attached screenshot.

transaction-receipt-options-screen.png

Currently, We are analyzing the intents (ACTION_START_PRINT_RECEIPTS, EXTRA_DISABLE_RECEIPT_OPTIONS) to open the Receipt Options Screen like, but we didn’t get an exact solution. Could you please let us know, Is it possible to open this screen? If yes, then please suggest any best way(Using Intents or Any Connector) to open this screen after payment success. Or recommend any other way to send payment details and payment receipt on email and SMS by using Clover provided functionality.

Clover Android SDKPaymentConnectorIntents
10 |2000

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

David Marginian avatar image
David Marginian answered

Per the nested discussion, the issue was with cash payments. Payment connector (what the developer was using) does not handle cash payments. In order to handle cash payments you need to use ACTION_CLOVER_PAY, which will present the merchant with all available tenders and present the desired receipt screen after the payment is complete.

10 |2000

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

David Marginian avatar image
David Marginian answered

How are you triggering the payment flow? Can you explain why ACTION_START_PRINT_RECEIPTS isn't an "exact solution"?

10 |2000

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

ramu avatar image
ramu answered ramu commented

Hi David,

Thanks for the response.

We are trying with below approach. After payment success, we are getting screen as below attached screenshot.

Intent intent = new Intent(Intents.ACTION_START_PRINT_RECEIPTS);
 intent.putExtra(Intents.EXTRA_ORDER_ID,payment.getOrder().getId());
 startActivity(intent);

device-2022-01-08-201301.png

Please let me know if we are missing anything or suggest any other way to open the required screen.


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.

What happens when you select "Print Bill"?

0 Likes 0 ·
ramu avatar image ramu David Marginian ♦♦ ·

After selecting "Print Bill", it just sends a request to the printer to print the bill receipt.

For Cash Transaction, we are getting this screen after payment success.

1641654123195.png

For Credit Card Transaction, we are getting this screen after payment success.
1641653897337.png

0 Likes 0 ·
1641653897337.png (62.5 KiB)
1641654123195.png (27.0 KiB)
ramu avatar image ramu David Marginian ♦♦ ·

But we want to show receipt option screen for all transactions(Cash, Credit and Debit etc.) like below only for Print, Email and Text Message, not else. Please suggest any way.

1641654251269.png

0 Likes 0 ·
ramu avatar image
ramu answered David Marginian edited

No, We are getting some extra options as well, like "Web Payment Receipt" and "Order receipt options". We only want to show payment options except "Web Payment" like below screen.

1641655056700.png


1641655056700.png (43.4 KiB)
4 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.

Ok, I am not certain if it is possible, I just don't know. You haven't told me how you are launching the payment flow yet, I think if you use ACTION_CLOVER_PAY you will see the screen you desire, but, not sure that will work for your situation either (since I don't have many details on what you are actually doing or trying to accomplish in your app).
0 Likes 0 ·
ramu avatar image ramu David Marginian ♦♦ ·
Hi David,

We are using "PaymentConnector" to make payments. We are not using "ACTION_CLOVER_PAY" to make payments. Please let me know if it is possible with "PaymentConnector".

0 Likes 0 ·

I am a bit confused. You can't take cash payments via Payment Connector, it launches the secure payments app directly (only card payments). Can you explain how you are handling cash? Are you making a REST API request to add a payment record to the order and then trying to launch the receipt screen? Don't do that. If the customer is going to be paying in cash launch ACTION_CLOVER_PAY (this will allow the merchant to take a cash payment), that way we will create the payment record for you and you can properly handle cash.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community