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 |
cancel()
Cancels the current user action on the device.
|
void |
capturePreAuth(CapturePreAuthRequest request)
Capture a previous Auth.
|
void |
closeout(CloseoutRequest request)
Request a closeout of all orders.
|
void |
displayPaymentReceiptOptions(java.lang.String orderId,
java.lang.String paymentId)
Display the payment receipt screen for the orderId/paymentId combination.
|
void |
dispose()
Will dispose of the underlying connection to the device
|
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 |
openCashDrawer(java.lang.String reason)
Will trigger cash drawer to open that is connected to Clover Mini
|
void |
preAuth(PreAuthRequest request)
PreAuth method to obtain a Pre-Auth for a card
|
void |
print(PrintRequest request)
Request to print.
|
void |
printImage(Bitmap bitmap)
Print an image on the Clover Mini printer
|
void |
printImageFromURL(java.lang.String url)
Print an image on the Clover Mini printer
|
void |
printText(java.util.List<java.lang.String> messages)
Print simple lines of text to the Clover Mini printer
|
void |
readCardData(ReadCardDataRequest request)
Used to request card information.
|
void |
refundPayment(RefundPaymentRequest request)
Refund a specific payment
|
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 |
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 |
sendMessageToActivity(MessageToActivity request)
Send a message to a running custom activity on the Clover device
|
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
|
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 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 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 cancel()
ICloverConnectorcancel in interface ICloverConnectorpublic void printText(java.util.List<java.lang.String> messages)
ICloverConnectorprintText in interface ICloverConnectormessages - A list of text to printpublic void printImage(Bitmap bitmap)
ICloverConnectorprintImage in interface ICloverConnectorbitmap - An image to print
NOTE: This method is not implemented for the Java SDK. Use ICloverConnector.printImageFromURL(String) instead.public void printImageFromURL(java.lang.String url)
ICloverConnectorprintImageFromURL in interface ICloverConnectorurl - The url of an image to printpublic void showMessage(java.lang.String message)
ICloverConnectorshowMessage in interface ICloverConnectormessage - The message to displaypublic void showWelcomeScreen()
ICloverConnectorshowWelcomeScreen in interface ICloverConnectorpublic void showThankYouScreen()
ICloverConnectorshowThankYouScreen in interface ICloverConnectorpublic void displayPaymentReceiptOptions(java.lang.String orderId,
java.lang.String paymentId)
ICloverConnectordisplayPaymentReceiptOptions in interface ICloverConnectororderId - The ID of the order to print a receipt forpaymentId - The ID of the payment to print a receipt forpublic void openCashDrawer(java.lang.String reason)
ICloverConnectoropenCashDrawer in interface ICloverConnectorreason - Reason for opening the cash drawerpublic 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 startCustomActivity(CustomActivityRequest request)
ICloverConnectorstartCustomActivity in interface ICloverConnectorrequest - The request details