new RemoteMessageBuilder(defaultPackageName, remoteSourceSDK, remoteApplicationID, messageCount)
Builds messages to pass to the clover device.
Parameters:
Name | Type | Description |
---|---|---|
defaultPackageName |
string | the packagename used in constructing the messages |
remoteSourceSDK |
string | the name of the sdk in use. Used for metrics. |
remoteApplicationID |
string | the semi-integrated application using the sdk. |
messageCount |
string | the initial count ot use in message id's |
- Source:
Methods
buildCapturePreAuth(payload) → {string}
Builds a capture preauth message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the orderid, paymentid, amount, with optional tipAmount |
- Source:
Returns:
the constructed message
- Type
- string
buildCloseout(payload) → {string}
Builds a closeout message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | optional allowOpenTabs and batchid |
- Source:
Returns:
the constructed message
- Type
- string
buildDiscoveryRequest() → {string}
Builds a discovery request message
- Source:
Returns:
the constructed message
- Type
- string
buildDiscoveryRequestObject() → {RemoteMessage}
Builds a discovery request message
- Source:
Returns:
the constructed message
- Type
- RemoteMessage
buildFinishCancel() → {string}
Builds a message to indicate a cancel
- Source:
Returns:
the constructed message
- Type
- string
buildLastMessageRequest(payload) → {string}
Builds a message to get the last 'transactional' message from the device.
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | an empty map/object |
- Source:
Returns:
the constructed message
- Type
- string
buildOpenCashDrawer(payload) → {string}
Builds a message to open the cash drawer
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | an empty map/object |
- Source:
Returns:
the constructed message
- Type
- string
buildPaymentVoid(payload) → {string}
Builds a signature verified message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the signature verified object |
- Source:
Returns:
the constructed message
- Type
- string
buildPrintImage(payload) → {string}
Builds a message to print the (small) passed image
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | an object that has a single attribute; "png" : Base64 data. |
- Source:
Returns:
the constructed message
- Type
- string
buildPrintText(payload) → {string}
Builds a message to print passed text
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | an object of the form {"textLines" : textLines} |
- Source:
Returns:
the constructed message
- Type
- string
buildRefund(payload) → {string}
Builds a refund payment message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the orderid and paymentid with optional amount |
- Source:
Returns:
the constructed message
- Type
- string
buildRemoteMessage(method, type, payload, packageName) → {string}
Build a message given the inputs
Parameters:
Name | Type | Description |
---|---|---|
method |
string | One of the LanMethod constants |
type |
string | one of the RemoteMessageBuilder constants |
payload |
string | the json object payload (not a string) |
packageName |
string | an override of the package name (optional) |
- Source:
Returns:
the constructed message - a json object
- Type
- string
buildRemoteMessageObject(protocolMessage) → {RemoteMessage}
Parameters:
Name | Type | Description |
---|---|---|
protocolMessage |
Message |
- Source:
Returns:
- Type
- RemoteMessage
buildShowOrderScreen(payload) → {string}
Builds a message to drive the device to show an order on the screen
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | an order object |
- Source:
Returns:
the constructed message
- Type
- string
buildShowPaymentReceiptOptions(payload) → {string}
Builds a message to show the receipt options screen for a payment
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the orderid and paymentid |
- Source:
Returns:
the constructed message
- Type
- string
buildShowThankYouScreen() → {string}
Builds a message to send to the device to make it show the 'Thank You' screen
- Source:
Returns:
the constructed message
- Type
- string
buildShowWelcomeScreen() → {string}
Builds a message to send to the device to make it show the welcome screen
- Source:
Returns:
the constructed message
- Type
- string
buildShutdown() → {string}
Builds a message to ask the device to shutdown
- Source:
Returns:
the constructed message
- Type
- string
buildSignatureVerified(payload) → {string}
Builds a signature verified message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the signature verified object |
- Source:
Returns:
the constructed message
- Type
- string
buildTerminalMessage(payload) → {string}
Builds a terminal message (display message for device)
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the message |
- Source:
Returns:
the constructed message
- Type
- string
buildTipAdjust(payload) → {string}
Builds a tip adjust payment message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the orderid and paymentid with amount |
- Source:
Returns:
the constructed message
- Type
- string
buildTxStart(payload) → {string}
Builds a transaction start message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | an order object |
- Source:
Returns:
the constructed message
- Type
- string
buildVaultCard(payload) → {string}
Builds a vault card message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | card entry types allowed |
- Source:
Returns:
the constructed message
- Type
- string
buildVoidPayment(payload) → {string}
Builds a void payment message
Parameters:
Name | Type | Description |
---|---|---|
payload |
string | the signature verified object |
- Source:
Returns:
the constructed message
- Type
- string