com.taotao.cloud.pay.wxpay.wx.enums.TradeState Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of taotao-cloud-starter-pay-wxpay Show documentation
Show all versions of taotao-cloud-starter-pay-wxpay Show documentation
taotao-cloud-starter-pay-wxpay
package com.taotao.cloud.pay.wxpay.wx.enums;
import com.fasterxml.jackson.annotation.JsonCreator;
/**
* @author lingting 2021/2/25 15:35
*/
public enum TradeState {
/**
* 支付成功
*/
SUCCESS,
/**
* 转入退款
*/
REFUND,
/**
* 未支付
*/
NOTPAY,
/**
* 已关闭
*/
CLOSED,
/**
* 已撤销(刷卡支付)
*/
REVOKED,
/**
* 用户支付中
*/
USERPAYING,
/**
* 支付失败(其他原因,如银行返回失败)
*/
PAYERROR,
/**
* 已接收,等待扣款
*/
ACCEPT,
/**
* 异常
*/
ERROR,
;
@JsonCreator
public static TradeState of(String status) {
switch (status) {
case "SUCCESS":
return SUCCESS;
case "REFUND":
return REFUND;
case "NOTPAY":
return NOTPAY;
case "CLOSED":
return CLOSED;
case "REVOKED":
return REVOKED;
case "USERPAYING":
return USERPAYING;
case "PAYERROR":
return PAYERROR;
case "ACCEPT":
return ACCEPT;
default:
return ERROR;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy