StoredValueCardEvent

public class StoredValueCardEvent

An event fired for all interactions with a stored value card.

Fields

STORED_VALUE_CARD_ACTIVATED

public static final String STORED_VALUE_CARD_ACTIVATED

A stored value card has been successfully activated.

STORED_VALUE_CARD_ACTIVATION_FAILED

public static final String STORED_VALUE_CARD_ACTIVATION_FAILED

Deprecated on 2018-11-01. Please use STORED_VALUE_CARD_ACTIVATED with a non-zero status code instead. A stored value card has failed to activate.

STORED_VALUE_CARD_BALANCE_RETRIEVAL_FAILED

public static final String STORED_VALUE_CARD_BALANCE_RETRIEVAL_FAILED

Deprecated on 2018-11-01. Please use STORED_VALUE_CARD_BALANCE_RETRIEVED with a non-zero status code instead. A stored value card balance has not been retrieved.

STORED_VALUE_CARD_BALANCE_RETRIEVED

public static final String STORED_VALUE_CARD_BALANCE_RETRIEVED

A stored value card balance has been successfully retrieved.

STORED_VALUE_CARD_DEACTIVATED

public static final String STORED_VALUE_CARD_DEACTIVATED

A stored value card has been successfully deactivated.

STORED_VALUE_CARD_RELOADED

public static final String STORED_VALUE_CARD_RELOADED

A stored value card has been successfully reloaded.

STORED_VALUE_CARD_RELOAD_FAILED

public static final String STORED_VALUE_CARD_RELOAD_FAILED

Deprecated on 2018-11-01. Please use STORED_VALUE_CARD_RELOADED with a non-zero status code instead. A stored value card has failed to reload.

STORED_VALUE_CARD_UNLOADED

public static final String STORED_VALUE_CARD_UNLOADED

A stored value card has been successfully unloaded.

STORED_VALUE_CARD_UNLOAD_FAILED

public static final String STORED_VALUE_CARD_UNLOAD_FAILED

Deprecated on 2018-11-01. Please use STORED_VALUE_CARD_UNLOADED with a non-zero status code instead. A stored value card has failed to unload.

Methods

generateTransactionEventResponse

public TransactionEventResponse generateTransactionEventResponse()

Generate the TransactionEventResponse associated with this transaction.

getAvailableBalance

public Decimal getAvailableBalance()

A convenient method to retrieve the available balance from the card information, if available.

getCardInformation

public CardInformation getCardInformation()

Get card information for non gift cards

getCashbackAmount

public Decimal getCashbackAmount()

A convenient method to retrieve the amount due back to the customer.

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.

getPayment

public Payment getPayment()

Returns the payment object associated with this StoredValueCardEvent StoredValueCardInformation.

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.

getStoredValueCardInformation

public StoredValueCardInformation getStoredValueCardInformation()

A convenient method to retrieve the StoredValueCardInformation from the Payment.

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.