Enum Error

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Error>

    public enum Error
    extends java.lang.Enum<Error>
    Lists the types of errors that can occur during the payment process.
    • Enum Constant Detail

      • ERROR_BAD_REQUEST

        public static final Error ERROR_BAD_REQUEST
        Bad request error.
      • ERROR_BAD_RESPONSE

        public static final Error ERROR_BAD_RESPONSE
        Bad response
      • ERROR_CONNECTION_ERROR

        public static final Error ERROR_CONNECTION_ERROR
        Connection Error.
      • ERROR_INTERNAL_ERROR

        public static final Error ERROR_INTERNAL_ERROR
        Internal Error
      • ERROR_SERVICE_NOT_FOUND

        public static final Error ERROR_SERVICE_NOT_FOUND
        Service not found error.
      • ERROR_UNKNOWN

        public static final Error ERROR_UNKNOWN
        General Server Side error
      • ERROR_AUTHORIZATION_ERROR

        public static final Error ERROR_AUTHORIZATION_ERROR
        Service Authorization Error
      • ERROR_PURCHASE_DECLINED

        public static final Error ERROR_PURCHASE_DECLINED
        Purchase declined. Insufficient funds.
        This could also be thrown if purchase has been invoked before initiating the payment.
      • ERROR_PURCHASE_NOT_REQUIRED

        public static final Error ERROR_PURCHASE_NOT_REQUIRED
        Purchase not required
      • ERROR_INVALID_CARD

        public static final Error ERROR_INVALID_CARD
        Card could not be validated
    • Method Detail

      • values

        public static Error[] 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 (Error c : Error.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Error valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getErrorMessage

        public static java.lang.String getErrorMessage​(Error error)
        Get details of the error.
        Parameters:
        error - Error -PaymentError object.
        Returns:
        A String message with error details.
      • getErrorId

        public static int getErrorId​(Error error)