mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +08:00
增加几个支付相关的常量
This commit is contained in:
parent
1e7cb4d6b9
commit
17a446e372
@ -1,6 +1,7 @@
|
|||||||
package com.github.binarywang.wxpay.bean.request;
|
package com.github.binarywang.wxpay.bean.request;
|
||||||
|
|
||||||
import com.github.binarywang.wxpay.config.WxPayConfig;
|
import com.github.binarywang.wxpay.config.WxPayConfig;
|
||||||
|
import com.github.binarywang.wxpay.constant.WxPayConstants.RefundAccountSource;
|
||||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
@ -32,8 +33,10 @@ import java.util.Arrays;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@XStreamAlias("xml")
|
@XStreamAlias("xml")
|
||||||
public class WxPayRefundRequest extends WxPayBaseRequest {
|
public class WxPayRefundRequest extends WxPayBaseRequest {
|
||||||
private static final String[] REFUND_ACCOUNT = new String[]{"REFUND_SOURCE_RECHARGE_FUNDS",
|
private static final String[] REFUND_ACCOUNT = new String[]{
|
||||||
"REFUND_SOURCE_UNSETTLED_FUNDS"};
|
RefundAccountSource.RECHARGE_FUNDS,
|
||||||
|
RefundAccountSource.UNSETTLED_FUNDS
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 设备号
|
* 设备号
|
||||||
|
@ -98,7 +98,6 @@ public class WxPayConstants {
|
|||||||
public static final String MD5 = "MD5";
|
public static final String MD5 = "MD5";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限定支付方式
|
* 限定支付方式
|
||||||
*/
|
*/
|
||||||
@ -123,4 +122,155 @@ public class WxPayConstants {
|
|||||||
*/
|
*/
|
||||||
public static final String FAIL = "FAIL";
|
public static final String FAIL = "FAIL";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款资金来源
|
||||||
|
*/
|
||||||
|
public static class RefundAccountSource {
|
||||||
|
/**
|
||||||
|
* 可用余额退款/基本账户
|
||||||
|
*/
|
||||||
|
public static final String RECHARGE_FUNDS = "REFUND_SOURCE_RECHARGE_FUNDS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未结算资金退款
|
||||||
|
*/
|
||||||
|
public static final String UNSETTLED_FUNDS = "REFUND_SOURCE_UNSETTLED_FUNDS";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款渠道
|
||||||
|
*/
|
||||||
|
public static class RefundChannel {
|
||||||
|
/**
|
||||||
|
* 原路退款
|
||||||
|
*/
|
||||||
|
public static final String ORIGINAL = "ORIGINAL";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退回到余额
|
||||||
|
*/
|
||||||
|
public static final String BALANCE = "BALANCE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原账户异常退到其他余额账户
|
||||||
|
*/
|
||||||
|
public static final String OTHER_BALANCE = "OTHER_BALANCE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原银行卡异常退到其他银行卡
|
||||||
|
*/
|
||||||
|
public static final String OTHER_BANKCARD = "OTHER_BANKCARD";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易状态
|
||||||
|
*/
|
||||||
|
public static class WxpayTradeStatus {
|
||||||
|
/**
|
||||||
|
* 支付成功
|
||||||
|
*/
|
||||||
|
public static final String SUCCESS = "SUCCESS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付失败(其他原因,如银行返回失败)
|
||||||
|
*/
|
||||||
|
public static final String PAY_ERROR = "PAYERROR";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户支付中
|
||||||
|
*/
|
||||||
|
public static final String USER_PAYING = "USERPAYING";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已关闭
|
||||||
|
*/
|
||||||
|
public static final String CLOSED = "CLOSED";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未支付
|
||||||
|
*/
|
||||||
|
public static final String NOTPAY = "NOTPAY";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 转入退款
|
||||||
|
*/
|
||||||
|
public static final String REFUND = "REFUND";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已撤销(刷卡支付)
|
||||||
|
*/
|
||||||
|
public static final String REVOKED = "REVOKED";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款状态
|
||||||
|
*/
|
||||||
|
public static class RefundStatus {
|
||||||
|
/**
|
||||||
|
* 退款成功
|
||||||
|
*/
|
||||||
|
public static final String SUCCESS = "SUCCESS";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款关闭
|
||||||
|
*/
|
||||||
|
public static final String REFUND_CLOSE = "REFUNDCLOSE";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款处理中
|
||||||
|
*/
|
||||||
|
public static final String PROCESSING = "PROCESSING";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款异常,退款到银行发现用户的卡作废或者冻结了,导致原路退款银行卡失败,可前往商户平台(pay.weixin.qq.com)-交易中心,手动处理此笔退款。
|
||||||
|
*/
|
||||||
|
public static final String CHANGE = "CHANGE";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关闭订单结果错误代码
|
||||||
|
*/
|
||||||
|
public static class OrderCloseResultErrorCode {
|
||||||
|
/**
|
||||||
|
* 订单已支付
|
||||||
|
*/
|
||||||
|
public static final String ORDER_PAID = "ORDERPAID";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统错误
|
||||||
|
*/
|
||||||
|
public static final String SYSTEM_ERROR = "SYSTEMERROR";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单不存在
|
||||||
|
*/
|
||||||
|
public static final String ORDER_NOT_EXIST = "ORDERNOTEXIST";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单已关闭
|
||||||
|
*/
|
||||||
|
public static final String ORDER_CLOSED = "ORDERCLOSED";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名错误
|
||||||
|
*/
|
||||||
|
public static final String SIGN_ERROR = "SIGNERROR";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 未使用POST传递参数
|
||||||
|
*/
|
||||||
|
public static final String REQUIRE_POST_METHOD = "REQUIRE_POST_METHOD";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* XML格式错误
|
||||||
|
*/
|
||||||
|
public static final String XML_FORMAT_ERROR = "XML_FORMAT_ERROR";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单状态错误
|
||||||
|
*/
|
||||||
|
public static final String TRADE_STATE_ERROR = "TRADE_STATE_ERROR";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user