Enum DefaultTransactionFailureTypes
- java.lang.Object
-
- java.lang.Enum<DefaultTransactionFailureTypes>
-
- com.broadleafcommerce.cartoperation.domain.enums.DefaultTransactionFailureTypes
-
- All Implemented Interfaces:
TransactionFailureType
,Serializable
,Comparable<DefaultTransactionFailureTypes>
public enum DefaultTransactionFailureTypes extends Enum<DefaultTransactionFailureTypes> implements TransactionFailureType
The default set oftransactionFailureTypes
that we expect to encounter with payment gateway interactions- Author:
- Chris Kittrell (ckittrell)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description API_RATE_LIMIT_ERROR
An error that occurs when too many requests hit the gateway's API too quicklyGATEWAY_CONFIGURATION_ERROR
The gateway is incorrectly configured or is not configured to handle the attempted type of requestGATEWAY_CREDENTIALS_ERROR
The provided payment gateway credentials are not validGATEWAY_ERROR
There was an unexpected error with the payment gateway itself.INTERNAL_ERROR
There was an error in our preparation of the gateway interaction or in our interpretation/storing of the response.INVALID_PAYMENT_METHOD
The provided payment method data is invalid.INVALID_REQUEST
There was a failure to process the request because the request itself is invalid.NETWORK_ERROR
There was an error in communicating with the payment gateway.PROCESSING_FAILURE
The payment gateway failed to successfully process the transaction.REQUIRES_3DS_VERIFICATION
Additional verification is required from the customer for the gateway to successfully process the transactionREQUIRES_ADDITIONAL_ACTION
Additional action is required for the transaction to be successfully processedRESPONSE_VALIDATION_FAILURE
There was an error when checking the validity of the response.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isAPIRateLimitError(String failureType)
static boolean
isGatewayConfigurationError(String failureType)
static boolean
isGatewayCredentialsError(String failureType)
static boolean
isGatewayError(String failureType)
static boolean
isInternalError(String failureType)
static boolean
isInvalidPaymentMethod(String failureType)
static boolean
isInvalidRequest(String failureType)
static boolean
isNetworkError(String failureType)
static boolean
isProcessingFailure(String failureType)
static boolean
isRequires3DSVerification(String failureType)
static boolean
isRequiresAdditionalAction(String failureType)
static boolean
isResponseValidationFailure(String failureType)
static DefaultTransactionFailureTypes
valueOf(String name)
Returns the enum constant of this type with the specified name.static DefaultTransactionFailureTypes[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.broadleafcommerce.cartoperation.domain.enums.TransactionFailureType
name
-
-
-
-
Enum Constant Detail
-
GATEWAY_CREDENTIALS_ERROR
public static final DefaultTransactionFailureTypes GATEWAY_CREDENTIALS_ERROR
The provided payment gateway credentials are not valid
-
GATEWAY_CONFIGURATION_ERROR
public static final DefaultTransactionFailureTypes GATEWAY_CONFIGURATION_ERROR
The gateway is incorrectly configured or is not configured to handle the attempted type of request
-
INVALID_REQUEST
public static final DefaultTransactionFailureTypes INVALID_REQUEST
There was a failure to process the request because the request itself is invalid.
-
INVALID_PAYMENT_METHOD
public static final DefaultTransactionFailureTypes INVALID_PAYMENT_METHOD
The provided payment method data is invalid. This could be an incorrect card number, expiration date, etc.
-
PROCESSING_FAILURE
public static final DefaultTransactionFailureTypes PROCESSING_FAILURE
The payment gateway failed to successfully process the transaction. This primarily represents a declined payment.
-
REQUIRES_3DS_VERIFICATION
public static final DefaultTransactionFailureTypes REQUIRES_3DS_VERIFICATION
Additional verification is required from the customer for the gateway to successfully process the transaction
-
REQUIRES_ADDITIONAL_ACTION
public static final DefaultTransactionFailureTypes REQUIRES_ADDITIONAL_ACTION
Additional action is required for the transaction to be successfully processed
-
GATEWAY_ERROR
public static final DefaultTransactionFailureTypes GATEWAY_ERROR
There was an unexpected error with the payment gateway itself.
-
NETWORK_ERROR
public static final DefaultTransactionFailureTypes NETWORK_ERROR
There was an error in communicating with the payment gateway. This can correlate to a known network failure/timeout or connection issue.
-
RESPONSE_VALIDATION_FAILURE
public static final DefaultTransactionFailureTypes RESPONSE_VALIDATION_FAILURE
There was an error when checking the validity of the response. Therefore, we're unsure if we can trust the contents of the response. In this case, it's best to treat the transaction as a failure and investigate it offline.
-
API_RATE_LIMIT_ERROR
public static final DefaultTransactionFailureTypes API_RATE_LIMIT_ERROR
An error that occurs when too many requests hit the gateway's API too quickly
-
INTERNAL_ERROR
public static final DefaultTransactionFailureTypes INTERNAL_ERROR
There was an error in our preparation of the gateway interaction or in our interpretation/storing of the response.
-
-
Method Detail
-
values
public static DefaultTransactionFailureTypes[] 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 (DefaultTransactionFailureTypes c : DefaultTransactionFailureTypes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DefaultTransactionFailureTypes 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
-
isGatewayCredentialsError
public static boolean isGatewayCredentialsError(String failureType)
-
isGatewayConfigurationError
public static boolean isGatewayConfigurationError(String failureType)
-
isInvalidRequest
public static boolean isInvalidRequest(String failureType)
-
isInvalidPaymentMethod
public static boolean isInvalidPaymentMethod(String failureType)
-
isProcessingFailure
public static boolean isProcessingFailure(String failureType)
-
isRequires3DSVerification
public static boolean isRequires3DSVerification(String failureType)
-
isRequiresAdditionalAction
public static boolean isRequiresAdditionalAction(String failureType)
-
isGatewayError
public static boolean isGatewayError(String failureType)
-
isNetworkError
public static boolean isNetworkError(String failureType)
-
isResponseValidationFailure
public static boolean isResponseValidationFailure(String failureType)
-
isAPIRateLimitError
public static boolean isAPIRateLimitError(String failureType)
-
isInternalError
public static boolean isInternalError(String failureType)
-
-