Getting started
CloverNetworkPaySdk cloverPaySdk = CloverNetworkPaySdk();
final config = CloverConnectionConfig(
applicationId: "RAID",
endpoint: "wss://",
posName: "Register_POS",
serialNumber: "Register_POS_ID",
onPairingCode: (String pairingCode) {},
onPairingSuccess: (String authToken) {},
onUpdatesUIState: (UiStateMessage message) {},
onDisconnect: () {},
onCreatePaymentStart: (TxStartResponseMessage message) {}
onSendMessage: (Map<String, dynamic> message) {}
onReceiveMessage: (Map<String, dynamic> message) {}
onPing: () {}
onPong: (bool pong) {}
);
final isConnected = await cloverPaySdk.init(config);
Pairing with devices
final pairingState = await cloverPaySdk.pairingRequest();
Pairing Cancel
await cloverPaySdk.pairingCancel();
Payment
final payIntent = PayIntent()
..amount = 9527
..tipAmount = "000"
..externalPaymentId = CloverId.getNewId()
..remotePrint = false;
final createPaymentResponse = await cloverPaySdk.createPayment(payIntent);