Enum PaymentDeclineType
- java.lang.Object
-
- java.lang.Enum<PaymentDeclineType>
-
- com.broadleafcommerce.cartoperation.domain.enums.PaymentDeclineType
-
- All Implemented Interfaces:
Serializable
,Comparable<PaymentDeclineType>
public enum PaymentDeclineType extends Enum<PaymentDeclineType> implements Serializable
When a payment gateway declines a payment, this value indicates whether it is a "soft" (insufficient funds) or "hard" (stolen card) decline. Generally, soft declines may be resolved given some time, and therefore, these payment methods can be retried. On the other hand, if a payment method receives a hard decline, then it will continuously fail and should not be used again.- Author:
- gdiaz, Chris Kittrell (ckittrell)
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getFriendlyName()
static boolean
isHardDecline(String declineType)
static boolean
isSoftDecline(String declineType)
static PaymentDeclineType
valueOf(String name)
Returns the enum constant of this type with the specified name.static PaymentDeclineType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SOFT
public static final PaymentDeclineType SOFT
-
HARD
public static final PaymentDeclineType HARD
-
-
Method Detail
-
values
public static PaymentDeclineType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PaymentDeclineType c : PaymentDeclineType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PaymentDeclineType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isSoftDecline
public static boolean isSoftDecline(String declineType)
-
isHardDecline
public static boolean isHardDecline(String declineType)
-
getFriendlyName
public String getFriendlyName()
-
-