public class CloverConnector extends java.lang.Object implements ICloverConnector
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.| Modifier and Type | Field and Description |
|---|---|
static com.clover.remote.InputOption |
CANCEL_INPUT_OPTION |
static int |
CARD_ENTRY_METHOD_ICC_CONTACT |
static int |
CARD_ENTRY_METHOD_MAG_STRIPE |
static int |
CARD_ENTRY_METHOD_MANUAL |
static int |
CARD_ENTRY_METHOD_NFC_CONTACTLESS |
static int |
MAX_PAYLOAD_SIZE |
| Constructor and Description |
|---|
CloverConnector(CloverDeviceConfiguration config)
CloverConnector constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptPayment(com.clover.sdk.v3.payments.Payment payment)
If payment confirmation is required during a Sale, this method accepts the payment
|
void |
acceptSignature(VerifySignatureRequest request)
If signature is captured during a Sale, this method accepts the signature as entered
|
void |
addCloverConnectorListener(ICloverConnectorListener connectorListener)
Registers the provided listener to receive callbacks and events from the underlying device connection.
|
void |
auth(AuthRequest request)
Auth method to obtain an Auth payment that can be used as the payment
to call tipAdjust
|
void |
capturePreAuth(CapturePreAuthRequest request)
Capture a previous Auth.
|
void |
checkBalance(CheckBalanceRequest request)
Check the balance on a card, if card supports balance inquiry
|
void |
closeout(CloseoutRequest request)
Request a closeout of all orders.
|
void |
displayPaymentReceiptOptions(DisplayReceiptOptionsRequest request)
Deprecated.
|
void |
displayReceiptOptions(DisplayReceiptOptionsRequest request)
Display receipt options for a Credit, Refund, or Payment
|
void |
dispose()
Will dispose of the underlying connection to the device
|
void |
incrementPreAuth(IncrementPreauthRequest request)
Request to increase the amount of an existing pre-auth
|
void |
initializeConnection()
Initialize the CloverConnector's connection and start communication with the device.
|
void |
invokeInputOption(com.clover.remote.InputOption io)
Used to invoke user options on the mini such as "OK", "CANCEL", "DONE", etc.
|
void |
manualRefund(ManualRefundRequest request)
Manual refund method, aka "naked credit"
|
void |
openCashDrawer(OpenCashDrawerRequest request)
Request that the cash drawer connected to the device be opened.
|
void |
preAuth(PreAuthRequest request)
PreAuth method to obtain a Pre-Auth for a card
|
void |
print(PrintRequest request)
Request to print.
|
void |
readCardData(ReadCardDataRequest request)
Used to request card information.
|
void |
refundPayment(RefundPaymentRequest request)
Refund a specific payment
|
void |
registerForCustomerProvidedData(RegisterForCustomerProvidedDataRequest request)
Register an interest in receiving customer provided data.
|
void |
rejectPayment(com.clover.sdk.v3.payments.Payment payment,
com.clover.remote.Challenge challenge)
If payment confirmation is required during a Sale, this method rejects the payment
|
void |
rejectSignature(VerifySignatureRequest request)
If signature is captured during a Sale, this method rejects the signature as entered
|
void |
removeCloverConnectorListener(ICloverConnectorListener connectorListener)
Remove a previously added listener.
|
void |
removeDisplayOrder(com.clover.remote.order.DisplayOrder order)
Remove the DisplayOrder from the device.
|
void |
requestSignature(SignatureRequest request)
Launch customer facing signature screen to collect a signature
|
void |
requestTip(TipRequest request)
Launch customer facing tip screen to request a tip amount
|
void |
resetDevice()
Used to reset the device if it gets in an invalid state from POS perspective.
|
void |
retrieveDeviceStatus(RetrieveDeviceStatusRequest request)
Send a message requesting the current status of the device.
|
void |
retrievePayment(RetrievePaymentRequest request)
Sends a request to get a payment.
|
void |
retrievePendingPayments()
Used to request a list of pending payments that have been taken offline, but
haven't processed yet.
|
void |
retrievePrinters(RetrievePrintersRequest request)
Request to retrieve available printers.
|
void |
retrievePrintJobStatus(PrintJobStatusRequest request)
Request the status of a given print job
|
void |
sale(SaleRequest request)
Sale method, aka "purchase"
|
void |
sendDebugLog(java.lang.String message)
Sends request to the clover device to send the log to the clover server
|
void |
sendMessageToActivity(MessageToActivity request)
Send a message to a running custom activity on the Clover device
|
void |
setCustomerInfo(SetCustomerInfoRequest request) |
void |
showDisplayOrder(com.clover.remote.order.DisplayOrder order)
Show the DisplayOrder on the device.
|
void |
showMessage(java.lang.String message)
Show a message on the Clover Mini screen
|
void |
showThankYouScreen()
Show the thank you screen on the device
|
void |
showWelcomeScreen()
Return the device to the Welcome Screen
|
void |
startCustomActivity(CustomActivityRequest request)
Request to start a Custom Activity on the Clover device
|
void |
tipAdjustAuth(TipAdjustAuthRequest request)
Adjust the tip for a previous Auth.
|
void |
vaultCard(java.lang.Integer cardEntryMethods)
Vault card information.
|
void |
voidPayment(VoidPaymentRequest request)
Void a transaction, given a previously used order ID and/or payment ID
|
void |
voidPaymentRefund(VoidPaymentRefundRequest request)
Refund a specific payment
|
public static final int CARD_ENTRY_METHOD_MAG_STRIPE
public static final int CARD_ENTRY_METHOD_ICC_CONTACT
public static final int CARD_ENTRY_METHOD_NFC_CONTACTLESS
public static final int CARD_ENTRY_METHOD_MANUAL
public static final int MAX_PAYLOAD_SIZE
public static final com.clover.remote.InputOption CANCEL_INPUT_OPTION
public CloverConnector(CloverDeviceConfiguration config)
config - A CloverDeviceConfiguration object containing the configuration for the devicepublic void addCloverConnectorListener(ICloverConnectorListener connectorListener)
initializeConnection() to guarantee notification of all
connection related callbacks.addCloverConnectorListener in interface ICloverConnectorconnectorListener - The listener to registerpublic void removeCloverConnectorListener(ICloverConnectorListener connectorListener)
removeCloverConnectorListener in interface ICloverConnectorconnectorListener - The listener to removepublic void initializeConnection()
ICloverConnectorinitializeConnection in interface ICloverConnectorpublic void sale(SaleRequest request)
ICloverConnectorsale in interface ICloverConnectorrequest - A SaleRequest object containing basic information needed for the transactionpublic void acceptSignature(VerifySignatureRequest request)
ICloverConnectoracceptSignature in interface ICloverConnectorrequest - Accepted requestpublic void rejectSignature(VerifySignatureRequest request)
ICloverConnectorrejectSignature in interface ICloverConnectorrequest - Rejected requestpublic void acceptPayment(com.clover.sdk.v3.payments.Payment payment)
ICloverConnectoracceptPayment in interface ICloverConnectorpayment - Payment to acceptpublic void rejectPayment(com.clover.sdk.v3.payments.Payment payment,
com.clover.remote.Challenge challenge)
ICloverConnectorrejectPayment in interface ICloverConnectorpayment - Payment to rejectchallenge - The challenge which resulted in payment rejectionpublic void auth(AuthRequest request)
ICloverConnectorauth in interface ICloverConnectorrequest - The request detailspublic void preAuth(PreAuthRequest request)
ICloverConnectorpreAuth in interface ICloverConnectorrequest - The request detailspublic void capturePreAuth(CapturePreAuthRequest request)
ICloverConnectorcapturePreAuth in interface ICloverConnectorrequest - The request detailspublic void incrementPreAuth(IncrementPreauthRequest request)
ICloverConnectorincrementPreAuth in interface ICloverConnectorrequest - The request detailspublic void tipAdjustAuth(TipAdjustAuthRequest request)
ICloverConnectortipAdjustAuth in interface ICloverConnectorrequest - The request detailspublic void vaultCard(java.lang.Integer cardEntryMethods)
ICloverConnectorvaultCard in interface ICloverConnectorcardEntryMethods - The card entry methods allowed to capture the payment token. null will provide default valuespublic void voidPayment(VoidPaymentRequest request)
ICloverConnectorvoidPayment in interface ICloverConnectorrequest - The request detailspublic void refundPayment(RefundPaymentRequest request)
ICloverConnectorrefundPayment in interface ICloverConnectorrequest - The request detailspublic void voidPaymentRefund(VoidPaymentRefundRequest request)
ICloverConnectorvoidPaymentRefund in interface ICloverConnectorrequest - The request detailspublic void manualRefund(ManualRefundRequest request)
ICloverConnectormanualRefund in interface ICloverConnectorrequest - The request detailspublic void retrievePendingPayments()
ICloverConnectorretrievePendingPayments in interface ICloverConnectorpublic void readCardData(ReadCardDataRequest request)
ICloverConnectorreadCardData in interface ICloverConnectorrequest - The request detailspublic void sendMessageToActivity(MessageToActivity request)
ICloverConnectorsendMessageToActivity in interface ICloverConnectorrequest - The request detailspublic void closeout(CloseoutRequest request)
ICloverConnectorcloseout in interface ICloverConnectorrequest - The request detailspublic void print(PrintRequest request)
ICloverConnectorprint in interface ICloverConnectorrequest - The request details: info and content needed to printpublic void retrievePrinters(RetrievePrintersRequest request)
ICloverConnectorretrievePrinters in interface ICloverConnectorrequest - object that contains additional information to be applied during the requestpublic void retrievePrintJobStatus(PrintJobStatusRequest request)
ICloverConnectorretrievePrintJobStatus in interface ICloverConnectorrequest - object defining the print job to be queriedpublic void openCashDrawer(OpenCashDrawerRequest request)
ICloverConnectoropenCashDrawer in interface ICloverConnectorrequest - object defining the reason the cash drawer is being opened, and an optional device identifierpublic void showMessage(java.lang.String message)
ICloverConnectorshowMessage in interface ICloverConnectormessage - The message to displaypublic void sendDebugLog(java.lang.String message)
ICloverConnectorsendDebugLog in interface ICloverConnectormessage - The message to displaypublic void showWelcomeScreen()
ICloverConnectorshowWelcomeScreen in interface ICloverConnectorpublic void showThankYouScreen()
ICloverConnectorshowThankYouScreen in interface ICloverConnector@Deprecated public void displayPaymentReceiptOptions(DisplayReceiptOptionsRequest request)
displayPaymentReceiptOptions in interface ICloverConnectorrequest - The request detailspublic void displayReceiptOptions(DisplayReceiptOptionsRequest request)
ICloverConnectordisplayReceiptOptions in interface ICloverConnectorrequest - The request detailspublic void showDisplayOrder(com.clover.remote.order.DisplayOrder order)
ICloverConnectorshowDisplayOrder in interface ICloverConnectororder - The order to displaypublic void removeDisplayOrder(com.clover.remote.order.DisplayOrder order)
ICloverConnectorremoveDisplayOrder in interface ICloverConnectororder - The order to removepublic void dispose()
ICloverConnectordispose in interface ICloverConnectorpublic void invokeInputOption(com.clover.remote.InputOption io)
ICloverConnectorinvokeInputOption in interface ICloverConnectorio - The option to invokepublic void resetDevice()
ICloverConnectorresetDevice in interface ICloverConnectorpublic void retrieveDeviceStatus(RetrieveDeviceStatusRequest request)
ICloverConnectorretrieveDeviceStatus in interface ICloverConnectorrequest - The request detailspublic void retrievePayment(RetrievePaymentRequest request)
ICloverConnectorretrievePayment in interface ICloverConnectorrequest - The request detailspublic void registerForCustomerProvidedData(RegisterForCustomerProvidedDataRequest request)
ICloverConnectorregisterForCustomerProvidedData in interface ICloverConnectorpublic void setCustomerInfo(SetCustomerInfoRequest request)
setCustomerInfo in interface ICloverConnectorpublic void startCustomActivity(CustomActivityRequest request)
ICloverConnectorstartCustomActivity in interface ICloverConnectorrequest - The request detailspublic void checkBalance(CheckBalanceRequest request)
ICloverConnectorcheckBalance in interface ICloverConnectorpublic void requestSignature(SignatureRequest request)
ICloverConnectorrequestSignature in interface ICloverConnectorpublic void requestTip(TipRequest request)
ICloverConnectorrequestTip in interface ICloverConnector