question

ahmed2403 avatar image
ahmed2403 asked David Marginian Deactivated answered

Device Connection Error After Completing First Transaction

After successfully completing the first transaction via our POS to the Clover Mini device using the semi-integrated option, if we try and do any more transactions from the POS software to the Clover mini, the mini doesn't recognise the transaction.

It seems maybe the first transaction isn't 'closing off' properly? After debugging the code, on the second transaction the response result is in the OnSaleResponse is 'Error {4}' and the reason is 'Device connection Error' and the message is "In Sale : SaleRequest - The Clover device is not connected."

Each time we are processing a new transaction we intiliaze the connection first.
Clover MiniUSB Pay Display
10 |2000

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

ahmed2403 avatar image
ahmed2403 answered
Yes I agree in terms of not disposing correctly. Windows SDK and .NET POS software.

When executing a transaction using SaleRequest, the OnSaleResponse method is called. The disposing isn't it automatically handled via the Clover library?

Thanks
10 |2000

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

ahmed2403 avatar image
ahmed2403 answered
Okay sure, so could you please advise on disposing the connection?

Even following this guide https://docs.clover.com/clover-platform/docs/windows#section--handling-the-result-of-a-sale-transaction- didn't outline disposing a connection within the example code.

Thanks
10 |2000

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

ahmed2403 avatar image
ahmed2403 answered
clover.pngI have now set it so the clover is initialized the same time our software is initially loaded, therefore clover is only initialized once. This together with disposing the cloverConnector in the OnSaleRequest method seems to work with new transactions after the first.

Although, since initializing the connector only once, the cloverConnector does lose some attributes, but like I said the transactions still work, so not sure how important this is?

A screenshot is attached for you to see which attributes it is losing.

Thanks

clover.png (405.7 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.

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