Package com.clover.remote.client
Class CloverConnector
java.lang.Object
com.clover.remote.client.CloverConnector
- All Implemented Interfaces:
ICloverConnector,Serializable
Provides the default implementation of the
ICloverConnector interface, connecting to the device specified
in the constructor. This implementation supports the registration of one or more ICloverConnectorListener
interfaces that are notified asynchronously of events and responses from the underlying connected Clover device.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.clover.remote.InputOptionstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionCloverConnector constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptPayment(com.clover.sdk.v3.payments.Payment payment) If payment confirmation is required during a Sale, this method accepts the paymentvoidacceptSignature(VerifySignatureRequest request) If signature is captured during a Sale, this method accepts the signature as enteredvoidaddCloverConnectorListener(ICloverConnectorListener connectorListener) Registers the provided listener to receive callbacks and events from the underlying device connection.voidauth(AuthRequest request) Auth method to obtain an Auth payment that can be used as the payment to call tipAdjustvoidcapturePreAuth(CapturePreAuthRequest request) Capture a previous Auth.voidcheckBalance(CheckBalanceRequest request) Check the balance on a card, if card supports balance inquiryvoidcloseout(CloseoutRequest request) Request a closeout of all orders.voidDeprecated.voidDisplay receipt options for a Credit, Refund, or Paymentvoiddispose()Will dispose of the underlying connection to the devicevoidincrementPreAuth(IncrementPreauthRequest request) Request to increase the amount of an existing pre-authvoidInitialize the CloverConnector's connection and start communication with the device.voidinvokeInputOption(com.clover.remote.InputOption io) Used to invoke user options on the mini such as "OK", "CANCEL", "DONE", etc.voidmanualRefund(ManualRefundRequest request) Manual refund method, aka "naked credit"voidopenCashDrawer(OpenCashDrawerRequest request) Request that the cash drawer connected to the device be opened.voidpreAuth(PreAuthRequest request) PreAuth method to obtain a Pre-Auth for a cardvoidprint(PrintRequest request) Request to print.voidreadCardData(ReadCardDataRequest request) Used to request card information.voidrefundPayment(RefundPaymentRequest request) Refund a specific paymentvoidRegister an interest in receiving customer provided data.voidrejectPayment(com.clover.sdk.v3.payments.Payment payment, com.clover.remote.Challenge challenge) If payment confirmation is required during a Sale, this method rejects the paymentvoidrejectSignature(VerifySignatureRequest request) If signature is captured during a Sale, this method rejects the signature as enteredvoidremoveCloverConnectorListener(ICloverConnectorListener connectorListener) Remove a previously added listener.voidremoveDisplayOrder(com.clover.remote.order.DisplayOrder order) Remove the DisplayOrder from the device.voidrequestSignature(SignatureRequest request) Launch customer facing signature screen to collect a signaturevoidrequestTip(TipRequest request) Launch customer facing tip screen to request a tip amountvoidUsed to reset the device if it gets in an invalid state from POS perspective.voidSend a message requesting the current status of the device.voidretrievePayment(RetrievePaymentRequest request) Sends a request to get a payment.voidUsed to request a list of pending payments that have been taken offline, but haven't processed yet.voidretrievePrinters(RetrievePrintersRequest request) Request to retrieve available printers.voidRequest the status of a given print jobvoidsale(SaleRequest request) Sale method, aka "purchase"voidsendDebugLog(String message) Sends request to the clover device to send the log to the clover servervoidsendMessageToActivity(MessageToActivity request) Send a message to a running custom activity on the Clover devicevoidsetCustomerInfo(SetCustomerInfoRequest request) voidshowDisplayOrder(com.clover.remote.order.DisplayOrder order) Show the DisplayOrder on the device.voidshowMessage(String message) Show a message on the Clover Mini screenvoidShow the thank you screen on the devicevoidReturn the device to the Welcome ScreenvoidstartCustomActivity(CustomActivityRequest request) Request to start a Custom Activity on the Clover devicevoidtipAdjustAuth(TipAdjustAuthRequest request) Adjust the tip for a previous Auth.voidVault card information.voidvoidPayment(VoidPaymentRequest request) Void a transaction, given a previously used order ID and/or payment IDvoidRefund a specific payment
-
Field Details
-
CARD_ENTRY_METHOD_MAG_STRIPE
public static final int CARD_ENTRY_METHOD_MAG_STRIPE- See Also:
-
CARD_ENTRY_METHOD_ICC_CONTACT
public static final int CARD_ENTRY_METHOD_ICC_CONTACT- See Also:
-
CARD_ENTRY_METHOD_NFC_CONTACTLESS
public static final int CARD_ENTRY_METHOD_NFC_CONTACTLESS- See Also:
-
CARD_ENTRY_METHOD_MANUAL
public static final int CARD_ENTRY_METHOD_MANUAL- See Also:
-
MAX_PAYLOAD_SIZE
public static final int MAX_PAYLOAD_SIZE- See Also:
-
CANCEL_INPUT_OPTION
public static final com.clover.remote.InputOption CANCEL_INPUT_OPTION
-
-
Constructor Details
-
CloverConnector
CloverConnector constructor- Parameters:
config- A CloverDeviceConfiguration object containing the configuration for the device
-
-
Method Details
-
addCloverConnectorListener
Registers the provided listener to receive callbacks and events from the underlying device connection. Note that listeners MUST be registered prior to callinginitializeConnection()to guarantee notification of all connection related callbacks.- Specified by:
addCloverConnectorListenerin interfaceICloverConnector- Parameters:
connectorListener- The listener to register
-
removeCloverConnectorListener
Remove a previously added listener. If the provided listener is not registered, this call has no effect.- Specified by:
removeCloverConnectorListenerin interfaceICloverConnector- Parameters:
connectorListener- The listener to remove
-
initializeConnection
public void initializeConnection()Description copied from interface:ICloverConnectorInitialize the CloverConnector's connection and start communication with the device. Must be called before calling any other method other than to add or remove listeners- Specified by:
initializeConnectionin interfaceICloverConnector
-
sale
Description copied from interface:ICloverConnectorSale method, aka "purchase"- Specified by:
salein interfaceICloverConnector- Parameters:
request- A SaleRequest object containing basic information needed for the transaction
-
acceptSignature
Description copied from interface:ICloverConnectorIf signature is captured during a Sale, this method accepts the signature as entered- Specified by:
acceptSignaturein interfaceICloverConnector- Parameters:
request- Accepted request
-
rejectSignature
Description copied from interface:ICloverConnectorIf signature is captured during a Sale, this method rejects the signature as entered- Specified by:
rejectSignaturein interfaceICloverConnector- Parameters:
request- Rejected request
-
acceptPayment
public void acceptPayment(com.clover.sdk.v3.payments.Payment payment) Description copied from interface:ICloverConnectorIf payment confirmation is required during a Sale, this method accepts the payment- Specified by:
acceptPaymentin interfaceICloverConnector- Parameters:
payment- Payment to accept
-
rejectPayment
public void rejectPayment(com.clover.sdk.v3.payments.Payment payment, com.clover.remote.Challenge challenge) Description copied from interface:ICloverConnectorIf payment confirmation is required during a Sale, this method rejects the payment- Specified by:
rejectPaymentin interfaceICloverConnector- Parameters:
payment- Payment to rejectchallenge- The challenge which resulted in payment rejection
-
auth
Description copied from interface:ICloverConnectorAuth method to obtain an Auth payment that can be used as the payment to call tipAdjust- Specified by:
authin interfaceICloverConnector- Parameters:
request- The request details
-
preAuth
Description copied from interface:ICloverConnectorPreAuth method to obtain a Pre-Auth for a card- Specified by:
preAuthin interfaceICloverConnector- Parameters:
request- The request details
-
capturePreAuth
Description copied from interface:ICloverConnectorCapture a previous Auth. Note: Should only be called if request's PaymentID is from an AuthResponse- Specified by:
capturePreAuthin interfaceICloverConnector- Parameters:
request- The request details
-
incrementPreAuth
Description copied from interface:ICloverConnectorRequest to increase the amount of an existing pre-auth- Specified by:
incrementPreAuthin interfaceICloverConnector- Parameters:
request- The request details
-
tipAdjustAuth
Description copied from interface:ICloverConnectorAdjust the tip for a previous Auth. Note: Should only be called if request's PaymentID is from an AuthResponse- Specified by:
tipAdjustAuthin interfaceICloverConnector- Parameters:
request- The request details
-
vaultCard
Description copied from interface:ICloverConnectorVault card information. Requests the mini capture card information and request a payment token from the payment gateway. The value returned in the response is a card, with all the information necessary to use for payment in a SaleRequest or AuthRequest- Specified by:
vaultCardin interfaceICloverConnector- Parameters:
cardEntryMethods- The card entry methods allowed to capture the payment token. null will provide default values
-
voidPayment
Description copied from interface:ICloverConnectorVoid a transaction, given a previously used order ID and/or payment ID- Specified by:
voidPaymentin interfaceICloverConnector- Parameters:
request- The request details
-
refundPayment
Description copied from interface:ICloverConnectorRefund a specific payment- Specified by:
refundPaymentin interfaceICloverConnector- Parameters:
request- The request details
-
voidPaymentRefund
Description copied from interface:ICloverConnectorRefund a specific payment- Specified by:
voidPaymentRefundin interfaceICloverConnector- Parameters:
request- The request details
-
manualRefund
Description copied from interface:ICloverConnectorManual refund method, aka "naked credit"- Specified by:
manualRefundin interfaceICloverConnector- Parameters:
request- The request details
-
retrievePendingPayments
public void retrievePendingPayments()Description copied from interface:ICloverConnectorUsed to request a list of pending payments that have been taken offline, but haven't processed yet. Will trigger an onRetrievePendingPaymentsResponse callback.- Specified by:
retrievePendingPaymentsin interfaceICloverConnector
-
readCardData
Description copied from interface:ICloverConnectorUsed to request card information. Specifically track1 and track2 information- Specified by:
readCardDatain interfaceICloverConnector- Parameters:
request- The request details
-
sendMessageToActivity
Description copied from interface:ICloverConnectorSend a message to a running custom activity on the Clover device- Specified by:
sendMessageToActivityin interfaceICloverConnector- Parameters:
request- The request details
-
closeout
Description copied from interface:ICloverConnectorRequest a closeout of all orders.- Specified by:
closeoutin interfaceICloverConnector- Parameters:
request- The request details
-
print
Description copied from interface:ICloverConnectorRequest to print.- Specified by:
printin interfaceICloverConnector- Parameters:
request- The request details: info and content needed to print
-
retrievePrinters
Description copied from interface:ICloverConnectorRequest to retrieve available printers.- Specified by:
retrievePrintersin interfaceICloverConnector- Parameters:
request- object that contains additional information to be applied during the request
-
retrievePrintJobStatus
Description copied from interface:ICloverConnectorRequest the status of a given print job- Specified by:
retrievePrintJobStatusin interfaceICloverConnector- Parameters:
request- object defining the print job to be queried
-
openCashDrawer
Description copied from interface:ICloverConnectorRequest that the cash drawer connected to the device be opened.- Specified by:
openCashDrawerin interfaceICloverConnector- Parameters:
request- object defining the reason the cash drawer is being opened, and an optional device identifier
-
showMessage
Description copied from interface:ICloverConnectorShow a message on the Clover Mini screen- Specified by:
showMessagein interfaceICloverConnector- Parameters:
message- The message to display
-
sendDebugLog
Description copied from interface:ICloverConnectorSends request to the clover device to send the log to the clover server- Specified by:
sendDebugLogin interfaceICloverConnector- Parameters:
message- The message to display
-
showWelcomeScreen
public void showWelcomeScreen()Description copied from interface:ICloverConnectorReturn the device to the Welcome Screen- Specified by:
showWelcomeScreenin interfaceICloverConnector
-
showThankYouScreen
public void showThankYouScreen()Description copied from interface:ICloverConnectorShow the thank you screen on the device- Specified by:
showThankYouScreenin interfaceICloverConnector
-
displayPaymentReceiptOptions
Deprecated.Display the payment receipt screen for the orderId/paymentId combination in the DisplayReceiptOptionsRequest object.- Specified by:
displayPaymentReceiptOptionsin interfaceICloverConnector- Parameters:
request- The request details
-
displayReceiptOptions
Description copied from interface:ICloverConnectorDisplay receipt options for a Credit, Refund, or Payment- Specified by:
displayReceiptOptionsin interfaceICloverConnector- Parameters:
request- The request details
-
showDisplayOrder
public void showDisplayOrder(com.clover.remote.order.DisplayOrder order) Description copied from interface:ICloverConnectorShow the DisplayOrder on the device. Replaces the existing DisplayOrder on the device.- Specified by:
showDisplayOrderin interfaceICloverConnector- Parameters:
order- The order to display
-
removeDisplayOrder
public void removeDisplayOrder(com.clover.remote.order.DisplayOrder order) Description copied from interface:ICloverConnectorRemove the DisplayOrder from the device.- Specified by:
removeDisplayOrderin interfaceICloverConnector- Parameters:
order- The order to remove
-
dispose
public void dispose()Description copied from interface:ICloverConnectorWill dispose of the underlying connection to the device- Specified by:
disposein interfaceICloverConnector
-
invokeInputOption
public void invokeInputOption(com.clover.remote.InputOption io) Description copied from interface:ICloverConnectorUsed to invoke user options on the mini such as "OK", "CANCEL", "DONE", etc.- Specified by:
invokeInputOptionin interfaceICloverConnector- Parameters:
io- The option to invoke
-
resetDevice
public void resetDevice()Description copied from interface:ICloverConnectorUsed to reset the device if it gets in an invalid state from POS perspective. This could cause a missed transaction or other missed information, so it needs to be used cautiously as a last resort- Specified by:
resetDevicein interfaceICloverConnector
-
retrieveDeviceStatus
Description copied from interface:ICloverConnectorSend a message requesting the current status of the device.- Specified by:
retrieveDeviceStatusin interfaceICloverConnector- Parameters:
request- The request details
-
retrievePayment
Description copied from interface:ICloverConnectorSends a request to get a payment. Only valid for payments made in the past 24 hours on the device queried.- Specified by:
retrievePaymentin interfaceICloverConnector- Parameters:
request- The request details
-
registerForCustomerProvidedData
Description copied from interface:ICloverConnectorRegister an interest in receiving customer provided data.- Specified by:
registerForCustomerProvidedDatain interfaceICloverConnector
-
setCustomerInfo
- Specified by:
setCustomerInfoin interfaceICloverConnector
-
startCustomActivity
Description copied from interface:ICloverConnectorRequest to start a Custom Activity on the Clover device- Specified by:
startCustomActivityin interfaceICloverConnector- Parameters:
request- The request details
-
checkBalance
Description copied from interface:ICloverConnectorCheck the balance on a card, if card supports balance inquiry- Specified by:
checkBalancein interfaceICloverConnector
-
requestSignature
Description copied from interface:ICloverConnectorLaunch customer facing signature screen to collect a signature- Specified by:
requestSignaturein interfaceICloverConnector
-
requestTip
Description copied from interface:ICloverConnectorLaunch customer facing tip screen to request a tip amount- Specified by:
requestTipin interfaceICloverConnector
-