java.lang.Object | ||
↳ | PayPalRetailObject | |
↳ | com.paypal.paypalretailsdk.PaymentDevice |
A payment device represents the abstract concept of something that can read payment information from a customer. This includes card swipe readers, EMV readers, barcode scanners, biometric devices we don't have yet, and DNA sequencers. Ok, not so much that last bit.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | PaymentDevice.BatteryInfoCallback | The battery status has been updated | |||||||||
interface | PaymentDevice.BatteryStatusUpdateObserver | The battery status has been updated | |||||||||
interface | PaymentDevice.CardPresentedObserver | Depending on your region and the buyer payment type, this can mean a magnetic card was swiped, an EMV card was inserted, or an NFC card/device was tapped. | |||||||||
interface | PaymentDevice.CardRemovedObserver | A card has been removed (generally from an EMV reader, where the card stays in the reader for some time) | |||||||||
interface | PaymentDevice.ConnectCallback | ||||||||||
interface | PaymentDevice.ConnectedObserver | The reader is now connected and ready. | |||||||||
interface | PaymentDevice.ConnectionErrorObserver | The connection attempt with the reader failed | |||||||||
interface | PaymentDevice.DeviceLogsCallback | ||||||||||
interface | PaymentDevice.DisconnectCallback | ||||||||||
interface | PaymentDevice.DisconnectedObserver | The reader is now disconnected. | |||||||||
interface | PaymentDevice.SelectedObserver | The reader is now selected and active to be used. | |||||||||
interface | PaymentDevice.UpdateRequiredObserver | A software update is required for the reader. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addBatteryStatusUpdateObserver(PaymentDevice.BatteryStatusUpdateObserver observer)
Add an observer for the batteryStatusUpdate event
| ||||||||||
void |
addCardPresentedObserver(PaymentDevice.CardPresentedObserver observer)
Add an observer for the cardPresented event
| ||||||||||
void |
addCardRemovedObserver(PaymentDevice.CardRemovedObserver observer)
Add an observer for the cardRemoved event
| ||||||||||
void |
addConnectedObserver(PaymentDevice.ConnectedObserver observer)
Add an observer for the connected event
| ||||||||||
void |
addConnectionErrorObserver(PaymentDevice.ConnectionErrorObserver observer)
Add an observer for the connectionError event
| ||||||||||
void |
addDisconnectedObserver(PaymentDevice.DisconnectedObserver observer)
Add an observer for the disconnected event
| ||||||||||
void |
addSelectedObserver(PaymentDevice.SelectedObserver observer)
Add an observer for the selected event
| ||||||||||
void |
addUpdateRequiredObserver(PaymentDevice.UpdateRequiredObserver observer)
Add an observer for the updateRequired event
| ||||||||||
void |
connect(PaymentDevice.ConnectCallback callback)
Connect to this device.
| ||||||||||
void |
disconnect(PaymentDevice.DisconnectCallback callback)
Disconnect from the device.
| ||||||||||
Boolean |
doesHaveCapability(deviceCapabilityType capability)
Return true if this device has the requested capability
| ||||||||||
void |
extractReaderLogs(PaymentDevice.DeviceLogsCallback callback)
Extract logs from the device.
| ||||||||||
Boolean |
getActivated()
shows if the device has any active transaction @readonly
| ||||||||||
String |
getAddress()
Hardware address of this device
| ||||||||||
Boolean |
getCardInSlot()
Indicates whether a card is inserted within the reader at this moment @readonly
| ||||||||||
readerConnectionType |
getConnectionType()
Indicates the connection channel of the reader @readonly
| ||||||||||
List<FormFactor> |
getFormFactors()
The payment form factors
this device can support @readonly
| ||||||||||
String |
getId()
A unique identifier for the device @readonly
| ||||||||||
BatteryInfo |
getLastKnownBatteryInfo()
Status of the device battery @readonly
| ||||||||||
String |
getManufacturer()
The manufacturer of the card reader @readonly
| ||||||||||
ReaderModel |
getModel()
The model of the card reader @readonly
| ||||||||||
String |
getName()
A friendly name for the device @readonly
| ||||||||||
DeviceUpdate |
getPendingUpdate()
Any pending software update for
this device, or null if the device is current
| ||||||||||
String |
getSerialNumber()
The serial number of the device, if available @readonly
| ||||||||||
readerType |
getType()
Indicates the type of reader @readonly
| ||||||||||
Map<String, ? super Object> |
getVersionInfo()
Gets the device version information
| ||||||||||
Boolean |
isConnected()
Return true if this device is connected
| ||||||||||
DeviceStatus |
isReadyForTransaction()
Indicates if the device is ready for transaction
| ||||||||||
void |
removeBatteryStatusUpdateObserver(PaymentDevice.BatteryStatusUpdateObserver observer)
Remove an observer for the batteryStatusUpdate event
| ||||||||||
void |
removeCardPresentedObserver(PaymentDevice.CardPresentedObserver observer)
Remove an observer for the cardPresented event
| ||||||||||
void |
removeCardRemovedObserver(PaymentDevice.CardRemovedObserver observer)
Remove an observer for the cardRemoved event
| ||||||||||
void |
removeConnectedObserver(PaymentDevice.ConnectedObserver observer)
Remove an observer for the connected event
| ||||||||||
void |
removeConnectionErrorObserver(PaymentDevice.ConnectionErrorObserver observer)
Remove an observer for the connectionError event
| ||||||||||
void |
removeDisconnectedObserver(PaymentDevice.DisconnectedObserver observer)
Remove an observer for the disconnected event
| ||||||||||
void |
removeSelectedObserver(PaymentDevice.SelectedObserver observer)
Remove an observer for the selected event
| ||||||||||
void |
removeUpdateRequiredObserver(PaymentDevice.UpdateRequiredObserver observer)
Remove an observer for the updateRequired event
| ||||||||||
void |
retrieveBatteryInfo(PaymentDevice.BatteryInfoCallback cb)
Query card reader for battery information
| ||||||||||
void |
setAddress(String value)
Hardware address of this device
| ||||||||||
void |
setPendingUpdate(DeviceUpdate value)
Any pending software update for
this device, or null if the device is current
| ||||||||||
String |
toString()
Returns a string representing the serialized state of the PaymentDevice object
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Add an observer for the batteryStatusUpdate event
Add an observer for the cardPresented event
Add an observer for the cardRemoved event
Add an observer for the connected event
Add an observer for the connectionError event
Add an observer for the disconnected event
Add an observer for the selected event
Add an observer for the updateRequired event
Connect to this device. A device connected event will be emitted once the device is connected
Return true if this device has the requested capability
Extract logs from the device.
shows if the device has any active transaction @readonly
Hardware address of this device
Indicates whether a card is inserted within the reader at this moment @readonly
Indicates the connection channel of the reader @readonly
The payment form factors this device can support @readonly
A unique identifier for the device @readonly
The manufacturer of the card reader @readonly
A friendly name for the device @readonly
Any pending software update for this device, or null if the device is current
The serial number of the device, if available @readonly
Gets the device version information
Return true if this device is connected
Remove an observer for the batteryStatusUpdate event
Remove an observer for the cardPresented event
Remove an observer for the cardRemoved event
Remove an observer for the connected event
Remove an observer for the connectionError event
Remove an observer for the disconnected event
Remove an observer for the selected event
Remove an observer for the updateRequired event
Query card reader for battery information
Hardware address of this device
Any pending software update for this device, or null if the device is current
Returns a string representing the serialized state of the PaymentDevice object