Enum 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 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 name
        NullPointerException - if the argument is null
      • isSoftDecline

        public static boolean isSoftDecline​(String declineType)
      • isHardDecline

        public static boolean isHardDecline​(String declineType)
      • getFriendlyName

        public String getFriendlyName()