question

jasonbanks avatar image
jasonbanks asked jasonbanks answered

WebSocketCloverDeviceConfiguration help

Getting started with semi-integrated, however I cannot find API references for connections. Search for WebSocketCloverDeviceConfiguration returns zero results here and on docs.clover.com or on clover.github.io. Can someone please provide either an example of the API, or a link to documentation?
Remote Pay Windows
2 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.

racheladmin avatar image racheladmin commented ·

Hi @jasonbanks, which SDK are you using?

0 Likes 0 ·
jasonbanks avatar image jasonbanks commented ·
@racheladmin, Clover SDK for Windows POS Integration v1.3.2
0 Likes 0 ·
racheladmin avatar image
racheladmin Deactivated answered
Thanks @jasonbanks. Using Secure Network Pay Display with Remote Pay Windows is still experimental, but I can install the app to your sandbox test merchant, given its UUID: https://docs.clover.com/build/merchant-id-and-api-...

Here's a Windows example that uses WebSocketCloverDeviceConfiguration: https://github.com/clover/remote-pay-windows/blob/release-1.4.0/examples/CloverStarterExample/SampleUtils.cs#L25
10 |2000

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

jasonbanks avatar image
jasonbanks answered racheladmin Deactivated commented
@racheladmin, Perhaps I should clarify first, that I am using the correct connection method for what we are doing. The goal of our semi-integration is to use TCP/IP to talk to the terminal. The terminals are intended to be on the local network, but we cannot guarantee USB availability on the host so we must use network communications. That said, I see WebSocketCloverDeviceConfiguration as the only option to use.

The example you provided, I had found and have attempted to use with modifications. I am unable to find any documentation for the WebSocketCloverDeviceConfiguration. Specifically, I need to know what is expected for properties serialNumber, pairingAuthToken, and endpoint. The endpoint example shows port 12345, which I assume is not a real port? Serial number, I replaced with my devices serial (assumption). Pairing, I have no idea and the example shows the value as null.

Everything else seems straight forward, but getting past the initial connection is where I am stuck. As an FYI, I can ping the terminal without a problem.
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.

racheladmin avatar image racheladmin commented ·

@jasonbanks WebSocketCloverDeviceConfiguration is for communicating with the Clover device over LAN using the Secure Network Pay Display app (as opposed to over USB & the USB Pay Display app).

The Secure Network Pay Display app runs an on-Clover device server that communicates on port 12345 by default.

The serial is that of the POS, not the Clover device.

The authToken is null on first pairing, but is returned in onPairingSuccess for use in the next connection. authTokens are consumed on use; every time a connection is initialized, a new authToken is returned in onPairingSuccess. The example POS stores the authToken in Properties: https://github.com/clover/remote-pay-windows/blob/master/examples/CloverExamplePOS/StartupForm.cs#L54

Unfortunately, I don't have Windows-specific documentation of this class.

0 Likes 0 ·
jasonbanks avatar image
jasonbanks answered
@racheladmin thank you, I have updated code to reflect changes as indicated. It apears the terminal now hears me knocking on the door, but it is refusing connection (target mahine actively refused it). I have Cloud Pay Display installed and running. Below is my connection code (app name removed for privacy). Do you see something I am missing? Is there something on the terminal that I missed configuring?

CloverDeviceConfigurationconfig = new WebSocketCloverDeviceConfiguration("ws://10.0.0.39:12345/remote_pay",
"<ourappnamespace>",
false,
1,
"<ourposname>",
"ABC123",
null,
pairingCodeHandler,
pairingsuccessHandler);

CloverConnectorconnector = new CloverConnector(config);
CloverListenerlistener = new CloverListener(connector);
connector.InitializeConnection();

while (!connector.IsReady)
{
Thread.Sleep(100);
}

MessageBox.Show("Connector is ready");

10 |2000

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

racheladmin avatar image
racheladmin Deactivated answered
@jasonbanksCloud Pay Display is only for use with Remote Pay Cloud. To install Secure Network Pay Display, I'll need your test merchant UUID. If you aren't comfortable sharing that here, you can email semi-integrations@clover.com. I believe @lilly just added us to an email thread with you.
10 |2000

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

jasonbanks avatar image
jasonbanks answered
I'm sorry @racheladmin, I misread your previous request for UUID... I have sent it just now via email. Please let me know when it is ready to install from the app store. Thank you!!




10 |2000

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