public class

PaymentDevice

extends PayPalRetailObject
java.lang.Object
   ↳ PayPalRetailObject
     ↳ com.paypal.paypalretailsdk.PaymentDevice

Class Overview

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.

Summary

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
From class java.lang.Object

Public Methods

public void addBatteryStatusUpdateObserver (PaymentDevice.BatteryStatusUpdateObserver observer)

Add an observer for the batteryStatusUpdate event

public void addCardPresentedObserver (PaymentDevice.CardPresentedObserver observer)

Add an observer for the cardPresented event

public void addCardRemovedObserver (PaymentDevice.CardRemovedObserver observer)

Add an observer for the cardRemoved event

public void addConnectedObserver (PaymentDevice.ConnectedObserver observer)

Add an observer for the connected event

public void addConnectionErrorObserver (PaymentDevice.ConnectionErrorObserver observer)

Add an observer for the connectionError event

public void addDisconnectedObserver (PaymentDevice.DisconnectedObserver observer)

Add an observer for the disconnected event

public void addSelectedObserver (PaymentDevice.SelectedObserver observer)

Add an observer for the selected event

public void addUpdateRequiredObserver (PaymentDevice.UpdateRequiredObserver observer)

Add an observer for the updateRequired event

public void connect (PaymentDevice.ConnectCallback callback)

Connect to this device. A device connected event will be emitted once the device is connected

public void disconnect (PaymentDevice.DisconnectCallback callback)

Disconnect from the device.

public Boolean doesHaveCapability (deviceCapabilityType capability)

Return true if this device has the requested capability

public void extractReaderLogs (PaymentDevice.DeviceLogsCallback callback)

Extract logs from the device.

public Boolean getActivated ()

shows if the device has any active transaction @readonly

public String getAddress ()

Hardware address of this device

public Boolean getCardInSlot ()

Indicates whether a card is inserted within the reader at this moment @readonly

public readerConnectionType getConnectionType ()

Indicates the connection channel of the reader @readonly

public List<FormFactor> getFormFactors ()

The payment form factors this device can support @readonly

public String getId ()

A unique identifier for the device @readonly

public BatteryInfo getLastKnownBatteryInfo ()

Status of the device battery @readonly

public String getManufacturer ()

The manufacturer of the card reader @readonly

public ReaderModel getModel ()

The model of the card reader @readonly

public String getName ()

A friendly name for the device @readonly

public DeviceUpdate getPendingUpdate ()

Any pending software update for this device, or null if the device is current

public String getSerialNumber ()

The serial number of the device, if available @readonly

public readerType getType ()

Indicates the type of reader @readonly

public Map<String, ? super Object> getVersionInfo ()

Gets the device version information

public Boolean isConnected ()

Return true if this device is connected

public DeviceStatus isReadyForTransaction ()

Indicates if the device is ready for transaction

public void removeBatteryStatusUpdateObserver (PaymentDevice.BatteryStatusUpdateObserver observer)

Remove an observer for the batteryStatusUpdate event

public void removeCardPresentedObserver (PaymentDevice.CardPresentedObserver observer)

Remove an observer for the cardPresented event

public void removeCardRemovedObserver (PaymentDevice.CardRemovedObserver observer)

Remove an observer for the cardRemoved event

public void removeConnectedObserver (PaymentDevice.ConnectedObserver observer)

Remove an observer for the connected event

public void removeConnectionErrorObserver (PaymentDevice.ConnectionErrorObserver observer)

Remove an observer for the connectionError event

public void removeDisconnectedObserver (PaymentDevice.DisconnectedObserver observer)

Remove an observer for the disconnected event

public void removeSelectedObserver (PaymentDevice.SelectedObserver observer)

Remove an observer for the selected event

public void removeUpdateRequiredObserver (PaymentDevice.UpdateRequiredObserver observer)

Remove an observer for the updateRequired event

public void retrieveBatteryInfo (PaymentDevice.BatteryInfoCallback cb)

Query card reader for battery information

public void setAddress (String value)

Hardware address of this device

public void setPendingUpdate (DeviceUpdate value)

Any pending software update for this device, or null if the device is current

public String toString ()

Returns a string representing the serialized state of the PaymentDevice object