public static class TerminalListener.DefaultImpls
The TerminalListener
interface should be implemented in order to receive updates from
a class Terminal
instance.
Use of this SDK is subject to the Stripe Terminal Terms: https://stripe.com/terminal/legal
class Terminal
Modifier and Type | Method and Description |
---|---|
static void |
onConnectionStatusChange(TerminalListener $this,
ConnectionStatus status)
The
class Terminal 's connection status changed. |
static void |
onPaymentStatusChange(TerminalListener $this,
PaymentStatus status)
The
class Terminal 's payment status changed. |
static void |
onReportLowBatteryWarning(TerminalListener $this)
The
class Terminal reported that the reader's battery level is low |
static void |
onReportReaderEvent(TerminalListener $this,
ReaderEvent event)
The
class Terminal reported an event from the reader (e.g. a card was inserted). |
public static void onReportReaderEvent(TerminalListener $this, @NotNull ReaderEvent event)
The class Terminal
reported an event from the reader (e.g. a card was inserted).
$this
- The event reported by the readerevent
- The event reported by the readerclass Terminal
public static void onReportLowBatteryWarning(TerminalListener $this)
The class Terminal
reported that the reader's battery level is low
class Terminal
public static void onConnectionStatusChange(TerminalListener $this, @NotNull ConnectionStatus status)
The class Terminal
's connection status changed.
Note: You should not use this method to detect when a reader unexpectedly disconnects from your app, as it cannot be used to accurately distinguish between expected and unexpected disconnect events.
To detect unexpect disconnects (e.g. to automatically notify your user), you should instead use the .onUnexpectedReaderDisconnect method.
$this
- The terminal's new connection status.status
- The terminal's new connection status.class Terminal
,
.onUnexpectedReaderDisconnectpublic static void onPaymentStatusChange(TerminalListener $this, @NotNull PaymentStatus status)
The class Terminal
's payment status changed.
$this
- The new payment statusstatus
- The new payment statusclass Terminal