Clover SDK for Windows POS integration
Current version: 2.0.0
- Windows 10
- Windows 8
- Windows 7
.NET Frameworks supported:
- .NET 4.5 (and later)
- .NET 4.0 "backwards compatibility"
Connecting to a Clover device
The Windows project includes three options for connecting to a Clover device.
- .NET DLL - CloverConnector.DLL can be used directly by a .NET application. This option requires .NET 4.0 or 4.5.
- Clover Connector REST API Service - This option requires your POS to implement a REST service in order to receive callbacks.
- Clover Connector WebSocket API Service - This option requires your POS to implement a WebSocket client in order to communicate with the service and receive callbacks.
To work with the project effectively, you will need:
- A computer or virtual machine running Windows. The SDK supports Windows 10, Windows 8, and Windows 7.
- An IDE, such as Visual Studio.
- To experience transactions end-to-end from the merchant and customer perspectives, we also recommend ordering a Clover DevKit.
Use NuGet references to easily include Remote Pay Windows in your .NET project https://www.nuget.org/packages/Clover.RemotePayWindows
Install-Package Clover.RemotePayWindows -Version 2.0.0
Installing the SDK and Services
There are two sets of binaries supplied, targeting different .NET Frameworks, the .NET 4.5 and .NET 4.0 backwards compatible.
- The .NET 4.5 binaries are able to use TLS 1.2 network security when talking to Clover Devices using Secure Network Pay Display.
- The .NET 4.0 binaries are the same platform as the previous releases of the Clover Windows SDK, and are provided for backwards compatibility.
There are four separate installers for each .NET Framework Target.
- CloverSDKSetup.exe - This file will install the DLL, as well as the Clover Connector REST Service or Clover Connector WebSocket Service. It will also install the example POS application and source for testing.
- CloverUSBDriverSetup.exe - This file installs the USB driver for the Clover device only.
- CloverRESTServiceSetup.exe - This file installs the REST Clover Connector Service and the USB driver for the Clover device.
- CloverWebSocketServiceSetup.exe - This file installs the WebSocket Clover Connector Service and the USB driver for the Clover device.
Building the SDK
The SDK has the following structure.
. ├── examples # Contains the C# Example application │ └── CloverExamplePOS │ └── exampleMessages ├── lib │ └── CloverConnector # CloverConnector module code │ └── CloverWindowsSDK # C# port of Clover Android SDK classes │ └── CloverWindowsTransport # Transport definitions (USB, WebSocket) ├── packages # Contains third-party dependencies │ └── lib └── services └── CloverWindowsSDKRESTService # Source for the Windows REST Service └── CloverWindowsWebSocketService # Source for the Windows WebSocket Service └── shared # Contains code shared by the Services
Working with the Example POS
To build and run the example POS application using .NET and VisualStudio 2015:
- Open Clover.sln
- Build all projects
- Select the CloverExamplePOS
- Click Run
Setting up a virtal machine
- Install VMWare Fusion. (NOTE: VirtualBox will not see the device properly.)
- Run the driver installers.
To debug the device in TCP/IP using Android Debug Bridge (adb):
- Plug the device into a laptop, then select Connect to Mac. This will set the device up for debugging on port 5555.
>adb tcpip 5555on the command line.
NOTE: If you see the message
error: more than one device and emulator, you will need to specify the device by ID. To do this:
>adb deviceson the command line. This will retrieve a list of available devices similar to the one below.
List of devices attached C010UC43040345 device C030UQ50550081 device
Modify the command from step 2 to include the ID for the device you want to set up.
>adb -s C030UQ50550081 tcpip 5555
This should cause the device to disconnect.
Select Connect to Windows.
Reconnect to the device using this command:
>adb connect 192.168.1.3:5555
adb logcat, or connect with the debugger via IP.
Your results will look like this:
List of devices attached C010UC43040345 device 192.168.1.3:5555 device