question

yasu avatar image
yasu asked David Marginian Deactivated commented

Interrupt halfway a transaction session

I'm working with a semi-integration Android app. I have set 3 minutes of delay in which customer should finish their payment. After this delay, a popup message "Timeout : Restart the transaction!" shows up on our POS system, but the customer still can proceed their transaction until the end.


Are there any way to interrupt the "transaction session" triggered by the code below in such case?

SaleRequest saleRequest = new SaleRequest();
saleRequest.setExternalId(ExternalIdUtils.generateNewID()); 
saleRequest.setAmount(amount);
saleRequest.setCardEntryMethods(CARD_ENTRY_METHOD_MANUAL |
                        CARD_ENTRY_METHOD_MAG_STRIPE |
                        CARD_ENTRY_METHOD_NFC_CONTACTLESS |
                        CARD_ENTRY_METHOD_ICC_CONTACT);
paymentConnector.sale(saleRequest);


I mean, I would like to stop this "session" after 3 minutes passed:

50-20220209-123847.png

Any advice would be appreciated.

Thank you in advance.

Paymentssemi-integrations
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 Deactivated answered yasu commented

There is a resetDevice API that will clear the transaction and void any existing payment, use it with caution. I recommend you read our best practices - https://docs.clover.com/docs/remote-pay-sdk-best-practices

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.

yasu avatar image yasu commented ·
I'll check them out now, thank you for your quick response!
0 Likes 0 ·
yasu avatar image
yasu answered David Marginian Deactivated commented

I have tested resetDevice() and I have seen there is still the bug that resetDevice() does not work on the tip screen : https://community.clover.com/questions/25340/cancel-sale-before-it-completes-using-resetdevice.html

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.

David Marginian avatar image David Marginian ♦♦ commented ·
It works fine for me.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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