question

John Turnipseed avatar image
John Turnipseed asked John Turnipseed commented

Detect PaymentConnector.sale() user progress / time out / failure on Flex device

We are currently working on an application for the Clover Flex device that leverages the PaymentConnector to request payment for an existing Clover Order that has already been created. There appear to be several flows while processing a SaleRequest that can end with a full screen dialog that has a button that must be tapped before our listener's onSaleResponse() method is called. Our use case is a customer facing unattended process, so we need a way to know if the user is actually making progress through the sale, or if they hit an error and/or just walked away.

I've seen other community post answers referencing using RemotePay's ICloverConnectorListener's onDeviceActivityStart/End to look at the the DeviceEventState, however that doesn't seem to exist as a thing on the clover-android-sdk side. DeviceEventState does exist, however I don't see a way to register a listener for those kind of events locally on device.

Is what I'm trying to do possible? And if so, how?


Clover Android SDKClover FlexPaymentConnector
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

·
David Marginian avatar image
David Marginian Deactivated answered John Turnipseed commented

"We are currently working on an application for the Clover Flex device that leverages the PaymentConnector to request payment for an existing Clover Order that has already been created."

This in itself can be very challenging. If the order is created on the same device where payment is being taken you will be ok, but if not you need to be very cautious (e.g. an order can partially sync to the device depending on how the order is created).

Payment Connector was designed to be used natively and the assumption was the merchant would be there during the payment flow, hence, there was no reason to provide onDeviceActivityStart, etc. Back to your question, I don't quite understand what you are trying to accomplish. "so we need a way to know if the user is actually making progress through the sale, or if they hit an error and/or just walked away." You can implement a timeout on your end, if the timeout is reached you will have to check on the status of the payment (via external id).


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.

John Turnipseed avatar image John Turnipseed commented ·
I've accepted the above answer as the current state of things, but it would be really handy to have some better feedback from PaymentConnector so we can reset our timeout timer as the customer moves through the flow.


For others that might stumble on this question/answer in the future and are looking to implement their own timeout solution, please be aware, we did encounter parts of some payment workflows (like Gift Cards) that do not currently appropriate cancel/close themselves if PaymentConnector's "resetDevice()" is called while they are active. We have reported our findings to Clover Developer support and are hoping to get a resolution.
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