Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public enum TerminalOperation
- Object
- Enum<TerminalOperation>
- TerminalOperation
ImplementsComparable<TerminalOperation>
The operations a PaymentTerminal can perform, as reported by
PaymentTerminal.supports(TerminalOperation).
A terminal asked for an operation it does not support completes the
request with an UnsupportedOperationException and never touches the
card, so checking first is a courtesy to the user rather than a safety
requirement.
Enum constants
SALE | Charge the card now: PaymentTerminal.collect(TerminalPaymentRequest). |
PRE_AUTHORIZATION | Reserve an amount to capture later, as a hotel or a bar tab does: TerminalPaymentRequest.setPreAuthorization(boolean). |
CAPTURE | Take money reserved by a pre-authorization: PaymentTerminal.capture(String, long, String). |
REVERSAL | Cancel a payment that has not settled yet, so it never shows on the statement: PaymentTerminal.reverse(String). |
REFUND | Return money for an earlier payment, by its transaction ID: PaymentTerminal.refund(TerminalRefundRequest). |
UNLINKED_REFUND | Return money to a card presented now, with no earlier payment to refer to. |
LOOKUP | Find out what became of a payment, by the app’s own reference: PaymentTerminal.lookup(String). |
RECONCILIATION | Close the day’s batch and report its totals: PaymentTerminal.reconcile(). |
TIPPING | Let the customer add a tip on the terminal: TerminalPaymentRequest.setAskForTip(boolean). |
CASHBACK | Hand the customer cash on top of the purchase: TerminalPaymentRequest.setCashbackAmount(long). |
RECEIPT_DATA | Report the data a card receipt must print, through TerminalResult.getReceipt(). |
Methods
public static TerminalOperation[] values() | |
public static TerminalOperation valueOf(String name) |
Inherited methods
Enum constant details
SALE
SALECharge the card now:
PaymentTerminal.collect(TerminalPaymentRequest).PRE_AUTHORIZATION
PRE_AUTHORIZATIONReserve an amount to capture later, as a hotel or a bar tab does:
TerminalPaymentRequest.setPreAuthorization(boolean).CAPTURE
CAPTURETake money reserved by a pre-authorization:
PaymentTerminal.capture(String, long, String).REVERSAL
REVERSALCancel a payment that has not settled yet, so it never shows on the
statement:
PaymentTerminal.reverse(String).REFUND
REFUNDReturn money for an earlier payment, by its transaction ID:
PaymentTerminal.refund(TerminalRefundRequest).UNLINKED_REFUND
UNLINKED_REFUNDReturn money to a card presented now, with no earlier payment to
refer to.
LOOKUP
LOOKUPFind out what became of a payment, by the app’s own reference:
PaymentTerminal.lookup(String).RECONCILIATION
RECONCILIATIONClose the day’s batch and report its totals:
PaymentTerminal.reconcile().TIPPING
TIPPINGLet the customer add a tip on the terminal:
TerminalPaymentRequest.setAskForTip(boolean).CASHBACK
CASHBACKHand the customer cash on top of the purchase:
TerminalPaymentRequest.setCashbackAmount(long).RECEIPT_DATA
RECEIPT_DATAReport the data a card receipt must print, through
TerminalResult.getReceipt().Method details
values
public static TerminalOperation[] values()valueOf
public static TerminalOperation valueOf(String name)