Enum PaymentStatus

    • Enum Constant Detail

      • UNPAID

        public static final PaymentStatus UNPAID
        Represents the payment status when the payment isn't paid yet.
      • WAITING

        public static final PaymentStatus WAITING
        Represents the payment status when the platform has waiting for the payment completion.
      • SUCCESS

        public static final PaymentStatus SUCCESS
        Represents the payment status when the payment is paid and fully completed.
      • UNKNOWN

        public static final PaymentStatus UNKNOWN
        Represents the payment status that isn't known yet.
    • Method Detail

      • values

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

        public static PaymentStatus 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
      • getByCode

        @NotNull
        public static @NotNull PaymentStatus getByCode​(int code)
        Get the enum constant by the known payment status code.
        If a relevant enum constant with this code will not be found then this method will return UNKNOWN constant as default.
        Parameters:
        code - the payment status code to find an enum constant.
        Returns:
        The found payment system enum constant or UNKNOWN by default.