CommerceEvent

public class CommerceEvent

The session-specific extension of status. This object is returned to the CommerceListener, and should never be constructed directly.

Fields

PARAMETER_SETUP

public static final String PARAMETER_SETUP

The type returned for terminal parameter setup

SESSION_CLOSED

public static final String SESSION_CLOSED

The type returned when a session is closed, but not by a request to endSession.

SESSION_ENDED

public static final String SESSION_ENDED

The type returned for an endSession request.

SESSION_ERROR

public static final String SESSION_ERROR

A general error has occurred in the session that has stopped an unspecified method from being performed.

SESSION_RESUMED

public static final String SESSION_RESUMED

The type returned for a resumeSession request.

SESSION_STARTED

public static final String SESSION_STARTED

The type returned for a startSession request.

Methods

generateResponse

public CommerceResponse generateResponse()

The generator method for generating the appropriate response for the current event. This will always return a concrete subclass of Response.

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.

getMessage

public String getMessage()

return message from event

getSessionId

public String getSessionId()

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

getStatus

public int getStatus()

Returns the event status

getType

public String getType()

Returns the Commerce Event constants in addition to the Status constants. Overridden here only to provide the appropriate documentation.