new CloverConnectorImpl(configuration)
Parameters:
Name | Type | Description |
---|---|---|
configuration |
Object.<string, string> | the configuration for the connector |
- Source:
Members
(static) ACK
The acknowledgement method type
This is a special type only present in the cloud adaptor.
- Source:
(static) ERROR
The acknowledgement method type
This is a special type only present in the cloud adaptor.
- Source:
(static) SHUTDOWN
The shutdown method type
This is a special type only present in the cloud adaptor.
- Source:
merchantInfo
This goes in a deserialization class
- Source:
Methods
acceptPayment(payment)
Accepts a payment that has been challenged.
Parameters:
Name | Type | Description |
---|---|---|
payment |
payments.Payment |
- Source:
Returns:
void
acceptSignature(request)
Send a signature acceptance
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.VerifySignatureRequest |
- Source:
Returns:
void
addCloverConnectorListener(connectorListener)
Add a listener that will be notified by this connector
Parameters:
Name | Type | Description |
---|---|---|
connectorListener |
ICloverConnectorListener |
- Source:
auth(request)
Request an authorization operation.
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.AuthRequest |
- Source:
Returns:
void
cancel()
Request a cancel be sent to the device.
- Source:
Returns:
void
capturePreAuth(request)
Request a preauth be captured.
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.CapturePreAuthRequest |
- Source:
Returns:
void
closeout(closeoutRequest)
Request a closeout.
Parameters:
Name | Type | Description |
---|---|---|
closeoutRequest |
remotepay.CloseoutRequest |
- Source:
Returns:
void
discountAddedToDisplayOrder(discountObj, orderObj)
Notify device of a discount being added to the orderObj. The discount will then reflect in the displayOrder.
Note: This is independent of a discount being added to a display line item.
Parameters:
Name | Type | Description |
---|---|---|
discountObj |
order.DisplayDiscount | |
orderObj |
order.DisplayOrder |
- Source:
Returns:
void
discountRemovedFromDisplayOrder(discount, orderObj)
Notify device of a discount being removed to the orderObj. The discount will then reflect in the displayOrder.
Note: This is independent of a discount being removed to a display line item.
Parameters:
Name | Type | Description |
---|---|---|
discount |
order.DisplayDiscount | |
orderObj |
order.DisplayOrder |
- Source:
Returns:
void
dispose()
Destroy the connector. After this is called, the connection to the device is severed, and this object is
no longer usable
- Source:
Returns:
void
(protected) getListeners() → {Array}
Used internally
- Source:
Returns:
- Type
- Array
handleDeviceResult(devices)
This function is called with the list of devices for the merchant. The default implementation
is to set the deviceId to theat of the device that maps to the this.configuration.deviceSerialId
Parameters:
Name | Type | Description |
---|---|---|
devices |
- Source:
initializeConnection()
Begin connecting.
- Source:
invokeInputOption(io)
Send a keystroke to the device. When in non secure displays are on the device, this can be used to
act in the role of the user to 'press' available keys.
Parameters:
Name | Type | Description |
---|---|---|
io |
remotemessage.InputOption |
- Source:
Returns:
void
lineItemAddedToDisplayOrder(lineItem, orderObj)
Notify device of a line item being added to the orderObj. The line item will then reflect in the displayOrder.
Note: This is independent of a line item being added to a display line item.
Parameters:
Name | Type | Description |
---|---|---|
lineItem |
order.DisplayLineItem | |
orderObj |
order.DisplayOrder |
- Source:
Returns:
void
lineItemRemovedFromDisplayOrder(lineItem, orderObj)
Notify device of a line item being removed to the orderObj. The line item will then reflect in the displayOrder.
Note: This is independent of a line item being removed to a display line item.
Parameters:
Name | Type | Description |
---|---|---|
lineItem |
order.DisplayLineItem | |
orderObj |
order.DisplayOrder |
- Source:
Returns:
void
(protected) logMessageRemotely(logLevel, messages)
Used internally
Parameters:
Name | Type | Description |
---|---|---|
logLevel |
remotemessage.LogLevelEnum | the logging level |
messages |
Object | a mappiing of string->string that is passed directly in the message |
- Source:
manualRefund(request)
Do a refund to a card.
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.ManualRefundRequest |
- Source:
Returns:
void
onResetRequest()
When the server requests a connection reset, this will be called.
The default implementation is to immediately drop the connection and reconnect. To allow
for current work to be completed, this can be overridden. If a reset request is sent, but ignored,
the server will forcably drop the connection after a period of time.
- Source:
openCashDrawer(reason)
Open the first cash drawer that is found connected to the clover device.
Parameters:
Name | Type | Description |
---|---|---|
reason |
string |
- Source:
Returns:
void
populateGeneric(apiMessage, message)
Newer sdk.remotemessage response objects contain a more standard pattern, but they do not share a
baseclass. This results in the unfortunate need for a convention that is not enforced. Some
subclasses will have these functions, others may not.
The convention is the presence of the getStatus() and getReason() functions.
Parameters:
Name | Type | Description |
---|---|---|
apiMessage |
remotepay.BaseResponse | |
message |
remotemessage.Message |
- Source:
preAuth(request)
Request a preauth operation.
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.PreAuthRequest |
- Source:
Returns:
void
printImage(bitmap)
Print the passed image. bitmap is a language specific object that represents an image.
Parameters:
Name | Type | Description |
---|---|---|
bitmap |
Img | an HTML DOM IMG object. |
- Source:
Returns:
void
printImageFromURL(imgUrl)
Print an image on the clover device that is found at the passed url.
Parameters:
Name | Type | Description |
---|---|---|
imgUrl |
string |
- Source:
Returns:
void
printText(messages)
Print text on the clover device printer.
Parameters:
Name | Type | Description |
---|---|---|
messages |
Array.<String> | An array of |
- Source:
Returns:
void
reconnect()
- Source:
Returns:
void
refundPayment(request)
Do a refund on a previously made payment.
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.RefundPaymentRequest |
- Source:
Returns:
void
rejectPayment(payment, challenge)
Rejects a payment that has been challenged.
Parameters:
Name | Type | Description |
---|---|---|
payment |
payments.Payment | |
challenge |
base.Challenge |
- Source:
Returns:
void
rejectSignature(request)
Reject a signature
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.VerifySignatureRequest |
- Source:
Returns:
void
removeCloverConnectorListener(connectorListener)
Remove a listener that will be notified by this connector
Parameters:
Name | Type | Description |
---|---|---|
connectorListener |
ICloverConnectorListener |
- Source:
removeDisplayOrder(orderObj)
Removes the Display orderObj information on the screen.
Parameters:
Name | Type | Description |
---|---|---|
orderObj |
DisplayOrder |
- Source:
Returns:
void
resetDevice()
Send a message to the device to reset back to the welcome screen. Can be used when the device is in
an unknown state.
- Source:
Returns:
void
sale(request)
Begin a sale transaction.
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.SaleRequest |
- Source:
Returns:
void
SDKInfo() → {String}
Returns information on the SDK. This is a string that is identified by the SDK type, a colon, and the
version with any release candidate appended.
- Source:
Returns:
- Type
- String
showDisplayOrder(orderObj)
Display orderObj information on the screen. Calls to this method will cause the DisplayOrder
to show on the clover device. If a DisplayOrder is already showing on the Clover device,
it will replace the existing DisplayOrder on the device.
Parameters:
Name | Type | Description |
---|---|---|
orderObj |
order.DisplayOrder |
- Source:
Returns:
void
showMessage(message)
Show a text message on the device.
Parameters:
Name | Type | Description |
---|---|---|
message |
string |
- Source:
Returns:
void
showPaymentReceiptOptions(orderId, paymentId)
Show the customer facing receipt option screen for the specified payment
Parameters:
Name | Type | Description |
---|---|---|
orderId |
string | |
paymentId |
string |
- Source:
Returns:
void
showThankYouScreen()
Show the thank you display on the device.
- Source:
Returns:
void
showWelcomeScreen()
Show the welcome display on the device.
- Source:
Returns:
void
tipAdjustAuth(request)
Tip adjust an existing auth
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.TipAdjustAuthRequest |
- Source:
Returns:
void
vaultCard(cardEntryMethods)
Vault a card using optional cardEntryMethods
Parameters:
Name | Type | Description |
---|---|---|
cardEntryMethods |
Number | must be an integer |
- Source:
Returns:
void
voidPayment(request)
Void a payment
Parameters:
Name | Type | Description |
---|---|---|
request |
remotepay.VoidPaymentRequest |
- Source:
Returns:
void