CardInformationReceivedEvent

public class CardInformationReceivedEvent

Contains the value from customer input on the terminal.

Fields

CARD_REMOVED

public static final int CARD_REMOVED

Status code indicating that the card was removed from the chip card reader

PLEASE_TRY_AGAIN

public static final int PLEASE_TRY_AGAIN

Status code indicating that there was an error and the card should be presented again. There is no need to call TransactionManager.requestCardData(String,CardInformation.PresentationMethod[]) again after receiving an event with this status code.

REMOVE_CARD

public static final int REMOVE_CARD

Status code indicating that the card needs to be removed from the chip card reader

SUCCESS

public static final int SUCCESS

Status code indicating that the card data was received successfully

TIMEOUT_NO_CARD_DETECTED

public static final int TIMEOUT_NO_CARD_DETECTED

Status code indicating that there was a timeout and no card was detected. TransactionManager.requestCardData(String,CardInformation.PresentationMethod[]) must be called again after receiving an event with this status code to attempt detecting a card again.

TYPE_CARD_DATA

public static final String TYPE_CARD_DATA

Card data event type

TYPE_TOKEN_QUERY

public static final String TYPE_TOKEN_QUERY

Token query event type

USE_CHIP_INSTEAD

public static final int USE_CHIP_INSTEAD

Status code indicating that the card should be presented in the chip card reader instead There is no need to call TransactionManager.requestCardData(String,CardInformation.PresentationMethod[]) again after receiving an event with this status code.

USE_MSR_INSTEAD

public static final int USE_MSR_INSTEAD

Status code indicating that the card should be presented in the magnetic stripe reader instead There is no need to call TransactionManager.requestCardData(String,CardInformation.PresentationMethod[]) again after receiving an event with this status code.

Methods

generateTransactionEventResponse

public TransactionEventResponse generateTransactionEventResponse()

Generate transaction event response for the current event.

Return:

empty response when a standard transaction event. Child classes may implement appropriate responses as needed.

getCardInformation

public CardInformation getCardInformation()

Returns full object with all available card information encapsulated.

getEventId

public String getEventId()

Returns the event ID associated with this event. Useful for matching the event received by the listener to the original status returned when issuing the call, for example, calling com.verifone.commerce.payment.TransactionManager.reprintReceipt(Payment) returns a CommerceEvent containing an event ID, which will match the event ID received by the CommerceListener when the receipt reprint is complete.

getInvoiceId

public String getInvoiceId()

The invoice ID for the transaction as a reference.

getMessage

public String getMessage()

A user-readable message. This message may not be localized, in which case the type field should be used for determining a localized message.

getSessionId

public String getSessionId()

Get the session ID for the session which triggered this event.

getStatus

public int getStatus()

Get the status for this particular event. A status of 0 means success, any other status is a failure.

getTransaction

public Transaction getTransaction()

The transaction associated with this event.

getType

public String getType()

The type of status. This will generally be SUCCESS for a status of 0, and contain a different type for other errors. For example, in a refund or void, it is possible to receive type TRANSACTION_NOT_FOUND. This may be used for localizing the specific messages as needed