Status

public class Status

The foundational Status class. This provides the structure for the return values of many of the API calls

Fields

STATUS_ERROR

public static final String STATUS_ERROR

The constant status type for a general error.

STATUS_INITIALIZED

public static final String STATUS_INITIALIZED

The constant status type for initialized.

STATUS_SETUP_COMPLETE

public static final String STATUS_SETUP_COMPLETE

The constant status type for setup complete.

STATUS_SUCCESS

public static final String STATUS_SUCCESS

The constant status type for success.

STATUS_TEARDOWN

public static final String STATUS_TEARDOWN

The constant status type for teardown complete.

Methods

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()

TODO(RobertF8): Move session ID to CommerceEvent, it’s not relevant here. 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.

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