Payment Refund Status Enum (refund/PayRefundStatusEnum.java)

ruoyi-office · yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundStatusEnum.java · java · MIT
payments, lang:java, tag:enums

Defines standard status codes for payment refund operations. Use this to maintain consistent state tracking across payment processing modules.

// Source: https://github.com/yuqing2026/ruoyi-office | License: MIT | Copyright 2021 yudao-cloud
// Provided via justclaw.it.com; keep this notice with the code.
package cn.iocoder.yudao.module.pay.enums.refund;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 渠道的退款状态枚举
 *
 * @author 宇擎源码
 */
@Getter
@AllArgsConstructor
public enum PayRefundStatusEnum {

    WAITING(0, "未退款"),
    SUCCESS(10, "退款成功"),
    FAILURE(20, "退款失败");

    private final Integer status;
    private final String name;

    public static boolean isSuccess(Integer status) {
        return Objects.equals(status, SUCCESS.getStatus());
    }

    public static boolean isFailure(Integer status) {
        return Objects.equals(status, FAILURE.getStatus());
    }

}

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key