I am trying to create an Apache Cordova plugin to integrate with the Clover Go device.
Taking reference from the https://github.com/clover/remote-pay-android-go I have done the following changes:
1. Created a class GoConnectorListener that implements ICloverGoConnectorListener.(In GitHub documentation, ICloverGoConnectorListener object is created while we need to implement a new class to use it)
2. Created the object overriding the methods
ccGoListener = new GoConnectorListener() {
public void...
...
}
3. Initialized cloverGo450Connector (In GitHub documentation, appVersion is not passed and it fails when not passed)
```
CloverGoDeviceConfiguration config = new CloverGoDeviceConfiguration.Builder(context, accessToken, goEnv, goApiKey, goSecret, appId, appVersion).deviceType(ReaderInfo.ReaderType.RP450). allowAutoConnect(false).build();
cloverGo450Connector = (CloverGoConnector) ConnectorFactory.createCloverConnector(config);
cloverGo450Connector.addCloverGoConnectorListener(ccGoListener);
cloverGo450Connector.initializeConnection();
```
4. Sale transaction
```
SaleRequest request = new SaleRequest(100, "10000");
cloverGo450Connector.sale(request);
```
When I added some logs in the methods overridden for GoConnectorListener object, I got following logs
onDeviceDiscovered - we were able to get Bluetooth device info
onGetMerchantInfo
onGetMerchantInfoResponse - we got merchantInfo as null
onDeviceError - we got deviceErrorEvent.getErrorType() value as READER_NOT_CONNECTED
Can someone help me understanding where I may be missing?