repo
stringclasses
1k values
file_url
stringlengths
96
373
file_path
stringlengths
11
294
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
6 values
commit_sha
stringclasses
1k values
retrieved_at
stringdate
2026-01-04 14:45:56
2026-01-04 18:30:23
truncated
bool
2 classes
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/CombineTransactionsRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/CombineTransactionsRequest.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; /** * <pre> * 使用合单支付接口,用户只输入一次密码,即可完成多个订单的支付。目前最多一次可支持50笔订单进行合单支付。 * 参考文档:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_1.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_2.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_3.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_4.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_5.shtml * </pre> * * @author thinsstar */ @Data @NoArgsConstructor public class CombineTransactionsRequest implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:合单商户appid * 变量名:combine_appid * 是否必填:是 * 类型:string[1,32] * 描述: * 合单发起方的appid。 * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "combine_appid") private String combineAppid; /** * <pre> * 字段名:合单商户号 * 变量名:combine_mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 合单发起方商户号。 * 示例值:1900000109 * </pre> */ @SerializedName(value = "combine_mchid") private String combineMchid; /** * <pre> * 字段名:合单商户订单号 * 变量名:combine_out_trade_no * 是否必填:是 * 类型:string[1,32] * 描述: * 合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一 。 * 示例值:P20150806125346 * </pre> */ @SerializedName(value = "combine_out_trade_no") private String combineOutTradeNo; /** * <pre> * 字段名:场景信息 * 变量名:scene_info * 是否必填:否 * 类型:object * 描述: * 支付场景信息描述 * </pre> */ @SerializedName(value = "scene_info") private SceneInfo sceneInfo; /** * <pre> * 字段名:子单信息 * 变量名:sub_orders * 是否必填:是 * 类型:array * 描述: * 最多支持子单条数:10 * </pre> */ @SerializedName(value = "sub_orders") private List<SubOrders> subOrders; /** * <pre> * 字段名:支付者 * 变量名:combine_payer_info * 是否必填:否(JSAPI必填) * 类型:object * 描述: * 支付者信息 * </pre> */ @SerializedName(value = "combine_payer_info") private CombinePayerInfo combinePayerInfo; /** * <pre> * 字段名:交易起始时间 * 变量名:time_start * 是否必填:否 * 类型:string[1,32] * 描述: * 订单生成时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 * 示例值:2019-12-31T15:59:59+08:00 * </pre> */ @SerializedName(value = "time_start") private String timeStart; /** * <pre> * 字段名:交易结束时间 * 变量名:time_expire * 是否必填:否 * 类型:string[1,32] * 描述: * 订单失效时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 * 示例值:2019-12-31T15:59:59+08:00 * </pre> */ @SerializedName(value = "time_expire") private String timeExpire; /** * <pre> * 字段名:通知地址 * 变量名:notify_url * 是否必填:是 * 类型:string[1,256] * 描述: * 接收微信支付异步通知回调地址,通知url必须为直接可访问的URL,不能携带参数。 * 格式: URL * 示例值:https://yourapp.com/notify * </pre> */ @SerializedName(value = "notify_url") private String notifyUrl; @Data @NoArgsConstructor public static class SceneInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:商户端设备号 * 变量名:device_id * 是否必填:否 * 类型:string[7,16] * 描述: * 终端设备号(门店号或收银设备ID)。 * 示例值:POS1:123 * </pre> */ @SerializedName(value = "device_id") private String deviceId; /** * <pre> * 字段名:用户终端IP * 变量名:payer_client_ip * 是否必填:是 * 类型:string[1,45] * 描述: * 用户的客户端IP,支持IPv4和IPv6两种格式的IP地址。 * 格式: ip(ipv4+ipv6) * 示例值:14.17.22.32 * </pre> */ @SerializedName(value = "payer_client_ip") private String payerClientIp; /** * <pre> * 字段名:H5场景信息 * 变量名:h5_info * 是否必填:否(H5支付必填) * 类型:object * 描述: * H5场景信息 * </pre> */ @SerializedName(value = "h5_info") private H5Info h5Info; } @Data @NoArgsConstructor public static class SubOrders implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:子单商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 子单发起方商户号,必须与发起方appid有绑定关系。 * 示例值:1900000109 * </pre> */ @SerializedName(value = "mchid") private String mchid; /** * <pre> * 字段名:附加信息 * 变量名:attach * 是否必填:是 * 类型:string[1,128] * 描述: * 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用。 * 示例值:深圳分店 * </pre> */ @SerializedName(value = "attach") private String attach; /** * <pre> * 字段名:订单金额 * 变量名:amount * 是否必填:是 * 类型:object * 描述: * 订单金额信息 * </pre> */ @SerializedName(value = "amount") private Amount amount; /** * <pre> * 字段名:子单商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[1,32] * 描述: * 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 * 特殊规则:最小字符长度为6 * 示例值:20150806125346 * </pre> */ @SerializedName(value = "out_trade_no") private String outTradeNo; /** * <pre> * 字段名:订单优惠标记 * 变量名:goods_tag * 是否必填:是 * 类型:string[1,32] * 描述: * 订单优惠标记,使用代金券或立减优惠功能时需要的参数,说明详见代金券或立减优惠 * 示例值:WXG * </pre> */ @SerializedName(value = "goods_tag") private String goodsTag; /** * <pre> * 字段名:二级商户号 * 变量名:sub_mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 二级商户商户号,由微信支付生成并下发。服务商子商户的商户号,被合单方。直连商户不用传二级商户号。 * 示例值:1900000109 * </pre> */ @SerializedName(value = "sub_mchid") private String subMchid; /** * <pre> * 字段名:商品描述 * 变量名:description * 是否必填:是 * 类型:string[1,127] * 描述: * 商品简单描述。需传入应用市场上的APP名字-实际商品名称,例如:天天爱消除-游戏充值。 * 示例值:腾讯充值中心-QQ会员充值 * </pre> */ @SerializedName(value = "description") private String description; /** * <pre> * 字段名:结算信息 * 变量名:settle_info * 是否必填:否 * 类型:Object * 描述:结算信息 * </pre> */ @SerializedName(value = "settle_info") private SettleInfo settleInfo; /** * <pre> * 字段名:子商户应用ID * 变量名:sub_appid * 是否必填:是 * 类型:string[1,32] * 描述: * 子商户申请的应用ID,全局唯一。请求基础下单接口时请注意APPID的应用属性,例如公众号场景下, * 需使用应用属性为公众号的APPID 若sub_openid有传的情况下, * sub_appid必填,且sub_appid需与sub_openid对应 * 示例值:wxd678efh567hg6999 * </pre> */ @SerializedName(value = "sub_appid") private String subAppid; } @Data @NoArgsConstructor public static class CombinePayerInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:用户标识 * 变量名:openid * 是否必填:是 * 类型:string[1,128] * 描述: * 使用合单appid获取的对应用户openid。是用户在商户appid下的唯一标识。 * 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o * </pre> */ @SerializedName(value = "openid") private String openid; /** * <pre> * 字段名:子用户标识 * 变量名:sub_openid * 是否必填:是 * 类型:string[1,128] * 描述: * 服务商模式下,使用某个子商户的Appid获取的对应用户Openid, * 是用户在该子商户Appid下的唯一标识。openid和sub_openid可以选传其中之一, * 如果选择传sub_openid,则必须传sub_appid。 * 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o * </pre> */ @SerializedName(value = "sub_openid") private String subOpenid; } @Data @NoArgsConstructor public static class Amount implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:标价金额 * 变量名:total_amount * 是否必填:是 * 类型:int * 描述: * 子单金额,单位为分 * 境外场景下,标价金额要超过商户结算币种的最小单位金额,例如结算币种为美元,则标价金额必须大于1美分 * 示例值:100 * </pre> */ @SerializedName(value = "total_amount") private Integer totalAmount; /** * <pre> * 字段名:标价币种 * 变量名:currency * 是否必填:是 * 类型:string[1,8] * 描述: * 符合ISO 4217标准的三位字母代码,人民币:CNY 。 * 示例值:CNY * </pre> */ @SerializedName(value = "currency") private String currency; } @Data @NoArgsConstructor public static class SettleInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:是否指定分账 * 变量名:profit_sharing * 是否必填:否 * 类型:bool * 描述: * 是否指定分账,枚举值 * true:是 * false:否 * 示例值:true * </pre> */ @SerializedName(value = "profit_sharing") private Boolean profitSharing; /** * <pre> * 字段名:补差金额 * 变量名:subsidy_amount * 是否必填:否 * 类型:int64 * 描述: * SettleInfo.profit_sharing为true时,该金额才生效。 * 注意:单笔订单最高补差金额为5000元 * 示例值:10 * </pre> */ @SerializedName(value = "subsidy_amount") private Integer subsidyAmount; } @Data @NoArgsConstructor public static class H5Info implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:场景类型 * 变量名:type * 是否必填:是 * 类型:string[1,32] * 描述: * 场景类型,枚举值: * iOS:IOS移动应用; * Android:安卓移动应用; * Wap:WAP网站应用; * 示例值:iOS * </pre> */ @SerializedName(value = "type") private String type; /** * <pre> * 字段名:应用名称 * 变量名:app_name * 是否必填:否 * 类型:string[1,64] * 描述: * 应用名称 * 示例值:王者荣耀 * </pre> */ @SerializedName(value = "app_name") private String appName; /** * <pre> * 字段名:网站URL * 变量名:app_url * 是否必填:否 * 类型:string[1,128] * 描述: * 网站URL * 示例值:https://pay.qq.com * </pre> */ @SerializedName(value = "app_url") private String appUrl; /** * <pre> * 字段名:iOS平台BundleID * 变量名:bundle_id * 是否必填:否 * 类型:string[1,128] * 描述: * iOS平台BundleID * 示例值:com.tencent.wzryiOS * </pre> */ @SerializedName(value = "bundle_id") private String bundleId; /** * <pre> * 字段名:Android平台PackageName * 变量名:package_name * 是否必填:否 * 类型:string[1,128] * 描述: * Android平台PackageName * 示例值:com.tencent.tmgp.sgame * </pre> */ @SerializedName(value = "package_name") private String packageName; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayQueryCommentRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayQueryCommentRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * <pre> * 拉取订单评价数据接口的请求参数封装类. * Created by BinaryWang on 2017/9/2. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayQueryCommentRequest extends BaseWxPayRequest { private static final long serialVersionUID = 2633600418272768186L; /** * <pre> * 字段名:开始时间. * 变量名:begin_time * 是否必填:是 * 类型:String(19) * 示例值:20170724000000 * 描述:按用户评论时间批量拉取的起始时间,格式为yyyyMMddHHmmss * </pre> */ @Required @XStreamAlias("begin_time") private String beginTime; /** * <pre> * 字段名:结束时间. * 变量名:end_time * 是否必填:是 * 类型:String(19) * 示例值:20170725000000 * 描述:按用户评论时间批量拉取的结束时间,格式为yyyyMMddHHmmss * </pre> */ @Required @XStreamAlias("end_time") private String endTime; /** * <pre> * 字段名:位移. * 变量名:offset * 是否必填:是 * 类型:uint(64) * 示例值:0 * 描述:指定从某条记录的下一条开始返回记录。接口调用成功时,会返回本次查询最后一条数据的offset。商户需要翻页时,应该把本次调用返回的offset 作为下次调用的入参。注意offset是评论数据在微信支付后台保存的索引,未必是连续的 * </pre> */ @Required @XStreamAlias("offset") private Integer offset; /** * <pre> * 字段名:条数. * 变量名:limit * 是否必填:否 * 类型:uint(32) * 示例值:100 * 描述:一次拉取的条数, 最大值是200,默认是200 * </pre> */ @XStreamAlias("limit") private Integer limit; /** * 检查约束情况. */ @Override protected void checkConstraints() throws WxPayException { } @Override protected void storeMap(Map<String, String> map) { map.put("begin_time", beginTime); map.put("end_time", endTime); map.put("offset", offset.toString()); if (limit != null) { map.put("limit", limit.toString()); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRedpackQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRedpackQueryRequest.java
package com.github.binarywang.wxpay.bean.request; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import java.util.Map; /** * <pre> * 注释中各行对应含义: * 字段名 * 字段 * 必填 * 示例值 * 类型 * 说明 * Created by Binary Wang on 2016-11-28. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayRedpackQueryRequest extends BaseWxPayRequest { @Override protected String[] getIgnoredParamsForSign() { return new String[]{"sub_appid", "sub_mch_id", "sign_type"}; } /** * 商户订单号 * mch_billno * 是 * 10000098201411111234567890 * String(28) * 商户发放红包的商户订单号 */ @XStreamAlias("mch_billno") private String mchBillNo; /** * 订单类型 * bill_type * 是 * MCHT * String(32) * MCHT:通过商户订单号获取红包信息。 */ @XStreamAlias("bill_type") private String billType; @Override protected void checkConstraints() { } @Override protected void storeMap(Map<String, String> map) { map.put("mch_billno", mchBillNo); map.put("bill_type", billType); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.List; /** * <pre> * 统一下单请求参数对象. * 参考文档:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_1.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_2_1.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_3_1.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_4_1.shtml * https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_5_1.shtml * </pre> * * @author thinsstar */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayUnifiedOrderV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:应用ID * 变量名:appid * 是否必填:是 * 类型:string[1,32] * 描述: * 由微信生成的应用ID,全局唯一。请求统一下单接口时请注意APPID的应用属性,例如公众号场景下,需使用应用属性为公众号的APPID * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "appid") protected String appid; /** * <pre> * 字段名:直连商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 直连商户的商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "mchid") protected String mchid; /** * <pre> * 字段名:商品描述 * 变量名:description * 是否必填:是 * 类型:string[1,127] * 描述: * 商品描述 * 示例值:Image形象店-深圳腾大-QQ公仔 * </pre> */ @SerializedName(value = "description") protected String description; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[6,32] * 描述: * 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "out_trade_no") protected String outTradeNo; /** * <pre> * 字段名:交易结束时间 * 变量名:time_expire * 是否必填:是 * 类型:string[1,64] * 描述: * 订单失效时间,遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss+TIMEZONE,YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头,HH:mm:ss表示时分秒,TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。例如:2015-05-20T13:29:35+08:00表示,北京时间2015年5月20日 13点29分35秒。 * 示例值:2018-06-08T10:34:56+08:00 * </pre> */ @SerializedName(value = "time_expire") protected String timeExpire; /** * <pre> * 字段名:附加数据 * 变量名:attach * 是否必填:否 * 类型:string[1,128] * 描述: * 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用 * 示例值:自定义数据 * </pre> */ @SerializedName(value = "attach") protected String attach; /** * <pre> * 字段名:通知地址 * 变量名:notify_url * 是否必填:是 * 类型:string[1,256] * 描述: * 通知URL必须为直接可访问的URL,不允许携带查询串,要求必须为https地址。 * 格式:URL * 示例值:https://www.weixin.qq.com/wxpay/pay.php * </pre> */ @SerializedName(value = "notify_url") private String notifyUrl; /** * <pre> * 字段名:订单优惠标记 * 变量名:goods_tag * 是否必填:否 * 类型:string[1,256] * 描述: * 订单优惠标记 * 示例值:WXG * </pre> */ @SerializedName(value = "goods_tag") private String goodsTag; /** * <pre> * 字段名:电子发票入口开放标识 * 变量名:support_fapiao * 是否必填:否 * 类型:boolean * 描述:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 * </pre> */ @SerializedName(value = "support_fapiao") private Boolean supportFapiao; /** * <pre> * 字段名:订单金额 * 变量名:amount * 是否必填:是 * 类型:object * 描述: * 订单金额信息 * </pre> */ @SerializedName(value = "amount") private Amount amount; /** * <pre> * 字段名:支付者 * 变量名:payer * 是否必填:是 * 类型:object * 描述: * 支付者信息 * </pre> */ @SerializedName(value = "payer") private Payer payer; /** * <pre> * 字段名:优惠功能 * 变量名:detail * 是否必填:否 * 类型:object * 描述: * 优惠功能 * </pre> */ @SerializedName(value = "detail") private Discount detail; /** * <pre> * 字段名:场景信息 * 变量名:scene_info * 是否必填:否 * 类型:object * 描述: * 支付场景描述 * </pre> */ @SerializedName(value = "scene_info") private SceneInfo sceneInfo; /** * <pre> * 字段名:结算信息 * 变量名:settle_info * 是否必填:否 * 类型:Object * 描述:结算信息 * </pre> */ @SerializedName(value = "settle_info") private SettleInfo settleInfo; @Data @NoArgsConstructor public static class Amount implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:总金额 * 变量名:total * 是否必填:是 * 类型:int * 描述: * 订单总金额,单位为分。 * 示例值:100 * </pre> */ @SerializedName(value = "total") private Integer total; /** * <pre> * 字段名:币类型 * 变量名:currency * 是否必填:否 * 类型:string[1,16] * 描述: * CNY:人民币,境内商户号仅支持人民币。 * 示例值:CNY * </pre> */ @SerializedName(value = "currency") private String currency; } @Data @NoArgsConstructor public static class Payer implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:用户标识 * 变量名:openid * 是否必填:是 * 类型:string[1,128] * 描述: * 用户在直连商户appid下的唯一标识。 * 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o * </pre> */ @SerializedName(value = "openid") private String openid; /** * 实名支付用户身份标识 */ @SerializedName(value = "identity") private Identity identity; } @Data @NoArgsConstructor public static class Discount implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:订单原价 * 变量名:cost_price * 是否必填:否 * 类型:int * 描述: * 1、商户侧一张小票订单可能被分多次支付,订单原价用于记录整张小票的交易金额。 * 2、当订单原价与支付金额不相等,则不享受优惠。 * 3、该字段主要用于防止同一张小票分多次支付,以享受多次优惠的情况,正常支付订单不必上传此参数。 * 示例值:608800 * </pre> */ @SerializedName(value = "cost_price") private Integer costPrice; /** * <pre> * 字段名:商品小票ID * 变量名:invoice_id * 是否必填:否 * 类型:string[1,32] * 描述: * 商品小票ID * 示例值:微信123 * </pre> */ @SerializedName(value = "invoice_id") private String invoiceId; /** * <pre> * 字段名:单品列表 * 变量名:goods_detail * 是否必填:否 * 类型:array * 描述: * 单品列表信息 * 条目个数限制:【1,6000】 * </pre> */ @SerializedName(value = "goods_detail") private List<GoodsDetail> goodsDetails; } @Data @NoArgsConstructor public static class GoodsDetail implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:商户侧商品编码 * 变量名:merchant_goods_id * 是否必填:是 * 类型:string[1,32] * 描述: * 由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 * 示例值:商品编码 * </pre> */ @SerializedName(value = "merchant_goods_id") private String merchantGoodsId; /** * <pre> * 字段名:微信侧商品编码 * 变量名:wechatpay_goods_id * 是否必填:否 * 类型:string[1,32] * 描述: * 微信支付定义的统一商品编号(没有可不传) * 示例值:1001 * </pre> */ @SerializedName(value = "wechatpay_goods_id") private String wechatpayGoodsId; /** * <pre> * 字段名:商品名称 * 变量名:goods_name * 是否必填:否 * 类型:string[1,256] * 描述: * 商品的实际名称 * 示例值:iPhoneX 256G * </pre> */ @SerializedName(value = "goods_name") private String goodsName; /** * <pre> * 字段名:商品数量 * 变量名:quantity * 是否必填:是 * 类型:int * 描述: * 用户购买的数量 * 示例值:1 * </pre> */ @SerializedName(value = "quantity") private Integer quantity; /** * <pre> * 字段名:商品单价 * 变量名:unit_price * 是否必填:是 * 类型:int * 描述: * 商品单价,单位为分 * 示例值:828800 * </pre> */ @SerializedName(value = "unit_price") private Integer unitPrice; } @Data @NoArgsConstructor public static class SceneInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:用户终端IP * 变量名:payer_client_ip * 是否必填:是 * 类型:string[1,45] * 描述: * 用户的客户端IP,支持IPv4和IPv6两种格式的IP地址。 * 示例值:14.23.150.211 * </pre> */ @SerializedName(value = "payer_client_ip") private String payerClientIp; /** * <pre> * 字段名:商户端设备号 * 变量名:device_id * 是否必填:否 * 类型:string[1,32] * 描述: * 商户端设备号(门店号或收银设备ID)。 * 示例值:013467007045764 * </pre> */ @SerializedName(value = "device_id") private String deviceId; /** * <pre> * 字段名:商户门店信息 * 变量名:store_info * 是否必填:否 * 类型:object * 描述: * 商户门店信息 * </pre> */ @SerializedName(value = "store_info") private StoreInfo storeInfo; /** * <pre> * 字段名:H5场景信息 * 变量名:h5_info * 是否必填:否(H5支付必填) * 类型:object * 描述: * H5场景信息 * </pre> */ @SerializedName(value = "h5_info") private H5Info h5Info; } @Data @NoArgsConstructor public static class StoreInfo implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:门店编号 * 变量名:id * 是否必填:是 * 类型:string[1,32] * 描述: * 商户侧门店编号 * 示例值:0001 * </pre> */ @SerializedName(value = "id") private String id; /** * <pre> * 字段名:门店名称 * 变量名:name * 是否必填:否 * 类型:string[1,256] * 描述: * 商户侧门店名称 * 示例值:腾讯大厦分店 * </pre> */ @SerializedName(value = "name") private String name; /** * <pre> * 字段名:地区编码 * 变量名:area_code * 是否必填:否 * 类型:string[1,32] * 描述: 地区编码, <a href="https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/applyments/chapter4_1.shtml">详细请见省市区编号对照表</a>。 * 示例值:440305 * </pre> */ @SerializedName(value = "area_code") private String areaCode; /** * <pre> * 字段名:详细地址 * 变量名:address * 是否必填:是 * 类型:string[1,512] * 描述: * 详细的商户门店地址 * 示例值:广东省深圳市南山区科技中一道10000号 * </pre> */ @SerializedName(value = "address") private String address; } @Data @NoArgsConstructor public static class H5Info implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:场景类型 * 变量名:type * 是否必填:是 * 类型:string[1,32] * 描述: * 场景类型 * 示例值:iOS, Android, Wap * </pre> */ @SerializedName(value = "type") private String type; /** * <pre> * 字段名:应用名称 * 变量名:app_name * 是否必填:否 * 类型:string[1,64] * 描述: * 应用名称 * 示例值:王者荣耀 * </pre> */ @SerializedName(value = "app_name") private String appName; /** * <pre> * 字段名:网站URL * 变量名:app_url * 是否必填:否 * 类型:string[1,128] * 描述: * 网站URL * 示例值:https://pay.qq.com * </pre> */ @SerializedName(value = "app_url") private String appUrl; /** * <pre> * 字段名:iOS平台BundleID * 变量名:bundle_id * 是否必填:否 * 类型:string[1,128] * 描述: * iOS平台BundleID * 示例值:com.tencent.wzryiOS * </pre> */ @SerializedName(value = "bundle_id") private String bundleId; /** * <pre> * 字段名:Android平台PackageName * 变量名:package_name * 是否必填:否 * 类型:string[1,128] * 描述: * Android平台PackageName * 示例值:com.tencent.tmgp.sgame * </pre> */ @SerializedName(value = "package_name") private String packageName; } @Data @NoArgsConstructor public static class SettleInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:是否指定分账 * 变量名:profit_sharing * 是否必填:否 * 类型:boolean * 描述: * 是否指定分账 * 示例值:false * </pre> */ @SerializedName(value = "profit_sharing") private Boolean profitSharing; } @Data @NoArgsConstructor public static class Identity implements Serializable { private static final long serialVersionUID = 1L; /** * 证件类型 * IDCARD:身份证 * HONGKONG_MACAO:港澳回乡证 * HONGKONG_MACAO_RESIDENT:港澳居住证 * TAIWAN_RESIDENT:台湾居住证 * FOREIGN_RESIDENT:外国人永居证 * OVERSEA_PASSPORT:护照 */ @SerializedName(value = "type") private String type; /** * 证件号 * 证件号,如身份证号。 * 示例值:43102119910910512X */ @SerializedName(value = "number") private String number; /** * 证件姓名。 * 示例值:周星星 */ @SerializedName(value = "name") private String name; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayCodepayRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayCodepayRequest.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.List; /** * V3付款码支付请求对象类 * @author <a href="https://github.com/xxm1995">DaxPay</a> * @date 2024/7/29 */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayCodepayRequest implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:应用ID * 变量名:appid * 是否必填:是 * 类型:string[1,32] * 描述: * 由微信生成的应用ID,全局唯一。请求统一下单接口时请注意APPID的应用属性,例如公众号场景下,需使用应用属性为公众号的APPID * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "appid") protected String appid; /** * <pre> * 字段名:直连商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 直连商户的商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "mchid") protected String mchid; /** * <pre> * 字段名:服务商应用ID * 变量名:sp_appid * 是否必填:否 * 类型:string[1,32] * 描述: * 服务商模式下使用,由微信生成的应用ID,全局唯一。 * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "sp_appid") protected String spAppid; /** * <pre> * 字段名:服务商商户号 * 变量名:sp_mchid * 是否必填:否 * 类型:string[1,32] * 描述: * 服务商模式下使用,服务商商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "sp_mchid") protected String spMchid; /** * <pre> * 字段名:子商户应用ID * 变量名:sub_appid * 是否必填:否 * 类型:string[1,32] * 描述: * 服务商模式下使用,由微信生成的应用ID,全局唯一。 * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "sub_appid") protected String subAppid; /** * <pre> * 字段名:子商户商户号 * 变量名:sub_mchid * 是否必填:否 * 类型:string[1,32] * 描述: * 服务商模式下使用,子商户商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "sub_mchid") protected String subMchid; /** * <pre> * 字段名:商品描述 * 变量名:description * 是否必填:是 * 类型:string[1,127] * 描述: * 商品描述 * 示例值:Image形象店-深圳腾大-QQ公仔 * </pre> */ @SerializedName(value = "description") protected String description; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[6,32] * 描述: * 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "out_trade_no") protected String outTradeNo; /** * <pre> * 字段名:微信支付返回的订单号 * 变量名:transaction_id * 是否必填:是 * 类型:string(32) * 描述: * 微信分配的公众账号ID * 示例值:1000320306201511078440737890 * </pre> */ @SerializedName(value = "transaction_id") private String transactionId; /** * <pre> * 字段名:附加数据 * 变量名:attach * 是否必填:否 * 类型:string[1,128] * 描述: * 附加数据,在查询API和支付通知中原样返回,可作为自定义参数使用 * 示例值:自定义数据 * </pre> */ @SerializedName(value = "attach") protected String attach; /** * <pre> * 字段名:订单优惠标记 * 变量名:goods_tag * 是否必填:否 * 类型:string[1,256] * 描述: * 订单优惠标记 * 示例值:WXG * </pre> */ @SerializedName(value = "goods_tag") private String goodsTag; /** * <pre> * 字段名:电子发票入口开放标识 * 变量名:support_fapiao * 是否必填:否 * 类型:boolean * 描述:传入true时,支付成功消息和支付详情页将出现开票入口。需要在微信支付商户平台或微信公众平台开通电子发票功能,传此字段才可生效。 * </pre> */ @SerializedName(value = "support_fapiao") private Boolean supportFapiao; /** * <pre> * 字段名:支付者 * 变量名:payer * 是否必填:是 * 类型:object * 描述: * 支付者信息 * </pre> */ @SerializedName(value = "payer") private Payer payer; /** * <pre> * 字段名:订单金额 * 变量名:amount * 是否必填:是 * 类型:object * 描述: * 订单金额信息 * </pre> */ @SerializedName(value = "amount") private Amount amount; /** * <pre> * 字段名:场景信息 * 变量名:scene_info * 是否必填:否 * 类型:object * 描述: * 支付场景描述 * </pre> */ @SerializedName(value = "scene_info") private SceneInfo sceneInfo; /** * <pre> * 字段名:优惠功能 * 变量名:promotion_detail * 是否必填:否 * 类型:array * 描述: * 优惠功能,享受优惠时返回该字段。 * </pre> */ @SerializedName(value = "promotion_detail") private List<PromotionDetail> promotionDetails; /** * <pre> * 字段名:结算信息 * 变量名:settle_info * 是否必填:否 * 类型:Object * 描述:结算信息 * </pre> */ @SerializedName(value = "settle_info") private SettleInfo settleInfo; @Data @NoArgsConstructor public static class Amount implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:总金额 * 变量名:total * 是否必填:否 * 类型:int * 描述: * 订单总金额,单位为分。 * 示例值:100 * </pre> */ @SerializedName(value = "total") private Integer total; /** * <pre> * 字段名:用户支付金额 * 变量名:payer_total * 是否必填:否 * 类型:int * 描述: * 用户支付金额,单位为分。 * 示例值:100 * </pre> */ @SerializedName(value = "payer_total") private Integer payerTotal; /** * <pre> * 字段名:货币类型 * 变量名:currency * 是否必填:否 * 类型:string[1,16] * 描述: * CNY:人民币,境内商户号仅支持人民币。 * 示例值:CNY * </pre> */ @SerializedName(value = "currency") private String currency; /** * <pre> * 字段名:用户支付币种 * 变量名:payer_currency * 是否必填:否 * 类型:string[1,16] * 描述: * 用户支付币种 * 示例值: CNY * </pre> */ @SerializedName(value = "payer_currency") private String payerCurrency; } @Data @NoArgsConstructor public static class Payer implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:用户标识 * 变量名:auth_code * 是否必填:是 * 类型:string[32] * 描述: * 付款码支付授权码,即用户打开微信钱包显示的码。 * 示例值:130061098828009406 * </pre> */ @SerializedName(value = "auth_code") private String authCode; } @Data @NoArgsConstructor public static class SceneInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:商户端设备 IP * 变量名:device_ip * 是否必填:是 * 类型:string[1,45] * 描述: * 用户的客户端IP,支持IPv4和IPv6两种格式的IP地址。 * 示例值:14.23.150.211 * </pre> */ @SerializedName(value = "device_ip") private String deviceIp; /** * <pre> * 字段名:商户端设备号 * 变量名:device_id * 是否必填:否 * 类型:string[1,32] * 描述: * 商户端设备号(门店号或收银设备ID)。 * 示例值:013467007045764 * </pre> */ @SerializedName(value = "device_id") private String deviceId; /** * <pre> * 字段名:商户门店信息 * 变量名:store_info * 是否必填:否 * 类型:object * 描述: * 商户门店信息 * </pre> */ @SerializedName(value = "store_info") private StoreInfo storeInfo; } /** * 商户门店信息 */ @Data @NoArgsConstructor public static class StoreInfo implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:门店编号 * 变量名:id * 是否必填:是 * 类型:string[1,32] * 描述: * 此参数与商家自定义编码(out_id)二选一必填。 * 微信支付线下场所ID,格式为纯数字。 * 基于合规要求与风险管理目的,线下条码支付时需传入用户实际付款的场景信息。 * 指引参见:https://kf.qq.com/faq/230817neeaem2308177ZFfqM.html。 * 示例值:0001 * </pre> */ @SerializedName(value = "id") private String id; /** * <pre> * 字段名:商家自定义编码 * 变量名:out_id * 是否必填:否 * 类型:string[1,256] * 描述: * 此参数与门店(id)二选一必填。 * 商户系统的门店编码,支持大小写英文字母、数字,仅支持utf-8格式。 * 基于合规要求与风险管理目的,线下条码支付时需传入用户实际付款的场景信息。 * 示例值:A1111 * </pre> */ @SerializedName(value = "out_id") private String outId; } @Data @NoArgsConstructor public static class SettleInfo implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:是否指定分账 * 变量名:profit_sharing * 是否必填:否 * 类型:boolean * 描述: * 是否指定分账 * 示例值:false * </pre> */ @SerializedName(value = "profit_sharing") private Boolean profitSharing; } /** * 优惠功能 */ @Data @NoArgsConstructor public static class PromotionDetail implements Serializable { /** * <pre> * 字段名:券ID * 变量名:coupon_id * 是否必填:是 * 类型:string[1,32] * 描述: * 券ID * 示例值:109519 * </pre> */ @SerializedName(value = "coupon_id") private String couponId; /** * <pre> * 字段名:优惠名称 * 变量名:name * 是否必填:否 * 类型:string[1,64] * 描述: * 优惠名称 * 示例值:单品惠-6 * </pre> */ @SerializedName(value = "name") private String name; /** * <pre> * 字段名:优惠范围 * 变量名:scope * 是否必填:否 * 类型:string[1,32] * 描述: * GLOBAL:全场代金券 * SINGLE:单品优惠 * 示例值:GLOBAL * </pre> */ @SerializedName(value = "scope") private String scope; /** * <pre> * 字段名:优惠类型 * 变量名:type * 是否必填:否 * 类型:string[1,32] * 描述: * CASH:充值 * NOCASH:预充值 * 示例值:CASH * </pre> */ @SerializedName(value = "type") private String type; /** * <pre> * 字段名:优惠券面额 * 变量名:amount * 是否必填:是 * 类型:int * 描述: * 优惠券面额 * 示例值:100 * </pre> */ @SerializedName(value = "amount") private Integer amount; /** * <pre> * 字段名:活动ID * 变量名:stock_id * 是否必填:否 * 类型:string[1,32] * 描述: * 活动ID * 示例值:931386 * </pre> */ @SerializedName(value = "stock_id") private String stockId; /** * <pre> * 字段名:微信出资 * 变量名:wechatpay_contribute * 是否必填:否 * 类型:int * 描述: * 微信出资,单位为分 * 示例值:0 * </pre> */ @SerializedName(value = "wechatpay_contribute") private Integer wechatpayContribute; /** * <pre> * 字段名:商户出资 * 变量名:merchant_contribute * 是否必填:否 * 类型:int * 描述: * 商户出资,单位为分 * 示例值:0 * </pre> */ @SerializedName(value = "merchant_contribute") private Integer merchantContribute; /** * <pre> * 字段名:其他出资 * 变量名:other_contribute * 是否必填:否 * 类型:int * 描述: * 其他出资,单位为分 * 示例值:0 * </pre> */ @SerializedName(value = "other_contribute") private Integer otherContribute; /** * <pre> * 字段名:优惠币种 * 变量名:currency * 是否必填:否 * 类型:string[1,16] * 描述: * CNY:人民币,境内商户号仅支持人民币。 * 示例值:CNY * </pre> */ @SerializedName(value = "currency") private String currency; /** * <pre> * 字段名:单品列表 * 变量名:goods_detail * 是否必填:否 * 类型:array * 描述: * 单品列表信息 * </pre> */ @SerializedName(value = "goods_detail") private List<GoodsDetail> goodsDetails; } @Data @NoArgsConstructor public static class GoodsDetail implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:商品编码 * 变量名:goods_id * 是否必填:是 * 类型:string[1,32] * 描述: * 商品编码 * 示例值:M1006 * </pre> */ @SerializedName(value = "goods_id") private String goodsId; /** * <pre> * 字段名:商品数量 * 变量名:quantity * 是否必填:是 * 类型:int * 描述: * 用户购买的数量 * 示例值:1 * </pre> */ @SerializedName(value = "quantity") private Integer quantity; /** * <pre> * 字段名:商品单价 * 变量名:unit_price * 是否必填:是 * 类型:int * 描述: * 商品单价,单位为分 * 示例值:100 * </pre> */ @SerializedName(value = "unit_price") private Integer unitPrice; /** * <pre> * 字段名:商品优惠金额 * 变量名:discount_amount * 是否必填:是 * 类型:int * 描述: * 商品优惠金额 * 示例值:0 * </pre> */ @SerializedName(value = "discount_amount") private Integer discountAmount; /** * <pre> * 字段名:商品备注 * 变量名:goods_remark * 是否必填:否 * 类型:string[1,128] * 描述: * 商品备注信息 * 示例值:商品备注信息 * </pre> */ @SerializedName(value = "goods_remark") private String goodsRemark; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayFacepayRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayFacepayRequest.java
package com.github.binarywang.wxpay.bean.request; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * <pre> * 提交刷脸支付请求对象类 * 详见文档:微信人脸支付商户开发文档 * Created by Jmdhappy on 2019-09-05. * </pre> * * @author <a href="https://github.com/jmdhappy/xxpay-master">XxPay</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayFacepayRequest extends BaseWxPayRequest { /** * <pre> * 字段名:设备号. * 变量名:device_info * 是否必填:否 * 类型:String(32) * 示例值:013467007045764 * 描述:终端设备号(商户自定义,如门店编号) * </pre> */ @XStreamAlias("device_info") private String deviceInfo; /** * <pre> * 字段名:商品描述. * 变量名:body * 是否必填:是 * 类型:String(128) * 示例值:image形象店-深圳腾大- QQ公仔 * 描述:商品或支付单简要描述,格式要求:门店品牌名-城市分店名-实际商品名称 * </pre> **/ @Required @XStreamAlias("body") private String body; /** * <pre> * 字段名:商品详情. * 变量名:detail * 是否必填:否 * 类型:String(8192) * 示例值: * 描述:商品详细列表,使用Json格式,传输签名前请务必使用CDATA标签将JSON文本串保护起来。</pre> **/ @XStreamAlias("detail") private String detail; /** * <pre> * 字段名:附加数据. * 变量名:attach * 是否必填:否 * 类型:String(127) * 示例值:说明 * 描述:附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据 * </pre> **/ @XStreamAlias("attach") private String attach; /** * <pre> * 字段名:商户订单号. * 变量名:out_trade_no * 是否必填:是 * 类型:String(32) * 示例值:1217752501201407033233368018 * 描述:商户系统内部的订单号,32个字符内、可包含字母;更换授权码必须要换新的商户订单号 其他说明见商户订单号 * </pre> **/ @Required @XStreamAlias("out_trade_no") private String outTradeNo; /** * <pre> * 字段名:总金额. * 变量名:total_fee * 是否必填:是 * 类型:Int * 示例值:888 * 描述:订单总金额,单位为分,只能为整数,详见支付金额 * </pre> **/ @Required @XStreamAlias("total_fee") private Integer totalFee; /** * <pre> * 字段名:货币类型. * 变量名:fee_type * 是否必填:否 * 类型:String(16) * 示例值:CNY * 描述:符合ISO4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型 * </pre> **/ @XStreamAlias("fee_type") private String feeType; /** * <pre> * 字段名:终端IP. * 变量名:spbill_create_ip * 是否必填:是 * 类型:String(16) * 示例值:127.0.0.1 * 描述:调用微信支付API的机器IP * </pre> **/ @Required @XStreamAlias("spbill_create_ip") private String spbillCreateIp; /** * <pre> * 字段名:商品标记. * 变量名:goods_tag * 是否必填:否 * 类型:String(32) * 示例值:1234 * 描述:商品标记,代金券或立减优惠功能的参数,说明详见代金券或立减优惠 * </pre> **/ @XStreamAlias("goods_tag") private String goodsTag; /** * <pre> * 字段名:用户标识. * 变量名:openid * 是否必填:是 * 类型:String(128) * 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o * 描述:用户在商户appid 下的唯一标识 * </pre> */ @Required @XStreamAlias("openid") private String openid; /** * <pre> * 字段名:人脸凭证. * 变量名:face_code * 是否必填:是 * 类型:String(128) * 示例值: * 描述:人脸凭证,用于刷脸支付 * </pre> **/ @Required @XStreamAlias("face_code") private String faceCode; @Override protected void checkConstraints() { //do nothing } @Override protected void storeMap(Map<String, String> map) { map.put("device_info", deviceInfo); map.put("body", body); map.put("detail", detail); map.put("attach", attach); map.put("out_trade_no", outTradeNo); map.put("total_fee", totalFee.toString()); map.put("fee_type", feeType); map.put("spbill_create_ip", spbillCreateIp); map.put("goods_tag", goodsTag); map.put("openid", openid); map.put("face_code", faceCode); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundQueryV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundQueryV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * <pre> * 微信支付-查询单笔退款API * </pre> * * @author thinsstar */ @Data @NoArgsConstructor public class WxPayRefundQueryV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:商户退款单号 * 变量名:out_refund_no * 是否必填:是 * 类型:string[1, 64] * 描述:商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "out_refund_no") private String outRefundNo; /** * <pre> * 字段名:子商户号 * 变量名:sub_mchid * 是否必填:是 * 类型:string[1, 32] * 描述:子商户的商户号,由微信支付生成并下发。 * 示例值:1900000109 * </pre> */ @SerializedName(value = "sub_mchid") private String subMchid; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderReverseRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderReverseRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import org.apache.commons.lang3.StringUtils; import java.util.Map; /** * <pre> * 撤销订单请求类 * Created by Binary Wang on 2017-3-23. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayOrderReverseRequest extends BaseWxPayRequest { /** * <pre> * 微信订单号 * transaction_id * String(28) * 1217752501201400000000000000 * 微信的订单号,优先使用 * </pre> */ @XStreamAlias("transaction_id") private String transactionId; /** * <pre> * 商户订单号 * out_trade_no * String(32) * 1217752501201400000000000000 * 商户系统内部的订单号 * transaction_id、out_trade_no二选一,如果同时存在优先级:transaction_id> out_trade_no * </pre> */ @XStreamAlias("out_trade_no") private String outTradeNo; @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo)) { throw new WxPayException("transaction_id 和 out_trade_no不能同时为空!"); } } @Override protected void storeMap(Map<String, String> map) { map.put("transaction_id", transactionId); map.put("out_trade_no", outTradeNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/CombineCloseRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/CombineCloseRequest.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; /** * <pre> * 合单支付订单只能使用此合单关单api完成关单。 * 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter5_1_12.shtml * </pre> * * @author thinsstar */ @Data @NoArgsConstructor public class CombineCloseRequest implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:合单商户appid * 变量名:combine_appid * 是否必填:是 * 类型:string[1,32] * 描述: * 合单发起方的appid。 * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "combine_appid") private String combineAppid; /** * <pre> * 字段名:合单商户订单号 * 变量名:combine_out_trade_no * 是否必填:是 * 类型:string[1,32] * 描述: * 合单支付总订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 * 示例值:P20150806125346 * </pre> */ private transient String combineOutTradeNo; /** * <pre> * 字段名:子单信息 * 变量名:sub_orders * 是否必填:是 * 类型:array * 描述: * 最多支持子单条数:10 * </pre> */ @SerializedName(value = "sub_orders") private List<SubOrders> subOrders; @Data @NoArgsConstructor public static class SubOrders implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:子单商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 子单发起方商户号,必须与发起方appid有绑定关系。 * 示例值:1900000109 * </pre> */ @SerializedName(value = "mchid") private String mchid; /** * <pre> * 字段名:子单商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[6,32] * 描述: * 商户系统内部订单号,要求32个字符内,只能是数字、大小写字母_-|*@ ,且在同一个商户号下唯一。 * 示例值:20150806125346 * </pre> */ @SerializedName(value = "out_trade_no") private String outTradeNo; /** * <pre> * 字段名:二级商户号 * 变量名:sub_mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 二级商户商户号,由微信支付生成并下发。服务商子商户的商户号,被合单方。直连商户不用传二级商户号。 * 示例值:1900000109 * </pre> */ @SerializedName(value = "sub_mchid") private String subMchid; /** * <pre> * 字段名:子商户应用ID * 变量名:sub_appid * 是否必填:是 * 类型:string[1,32] * 描述: * 子商户申请的应用ID,全局唯一。请求基础下单接口时请注意APPID的应用属性,例如公众号场景下, * 需使用应用属性为公众号的APPID 若sub_openid有传的情况下, * sub_appid必填,且sub_appid需与sub_openid对应 * 示例值:wxd678efh567hg6999 * </pre> */ @SerializedName(value = "sub_appid") private String subAppid; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxWithholdRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxWithholdRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * @author chenliang * created on 2021-08-02 5:26 下午 * * <pre> * 发起微信委托代扣参数 * </pre> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxWithholdRequest extends BaseWxPayRequest { /** * <pre> * 商品描述 * body * 是 * String(128) * ipad mini 16G 白色 * 商品支付单简要描述 * </pre> */ @Required @XStreamAlias("body") private String body; /** * <pre> * 商品详情 * detail * 否 * String(8192) * ipad mini 16G 白色 * 商品名称明细列表 * </pre> */ @XStreamAlias("detail") private String detail; /** * <pre> * 附加数据 * attach * 否 * String(127) * online/dev/dev1 * 商家数据包 * </pre> */ @XStreamAlias("attach") private String attach; /** * <pre> * 商户订单号 * out_trade_no * 是 * String(32) * 123456 * 商户系统内部的订单号,32字符内,可包含字母 * </pre> */ @Required @XStreamAlias("out_trade_no") private String outTradeNo; /** * <pre> * 总金额 * total_fee * 是 * int * 888 * 订单总金额,单位分 * </pre> */ @Required @XStreamAlias("total_fee") private Integer totalFee; /** * <pre> * 货币类型 * fee_type * 否 * String(16) * CNY * 默认人民币:CNY * </pre> */ @XStreamAlias("fee_type") private String feeType; /** * <pre> * 终端ip * spbill_create_ip * 否 * String(16) * 127.0.0.1 * 用户的客户端IP * </pre> */ @XStreamAlias("spbill_create_ip") private String spbillCreateIp; /** * <pre> * 商品标记 * goods_tag * 否 * String(32) * wxg * 商品标记,代金券或立减优惠功能参数 * </pre> */ @XStreamAlias("goods_tag") private String goodsTag; /** * <pre> * 回调通知url * notify_url * 是 * String(256) * https://weixin.qq.com * 回调通知地址 * </pre> */ @Required @XStreamAlias("notify_url") private String notifyUrl; /** * <pre> * 交易类型 * trade_type * 是 * String(16) * JSAPI * JSAPI,MWEB * </pre> */ @Required @XStreamAlias("trade_type") private String tradeType; /** * <pre> * 委托代扣协议ID * contract_id * 是 * String(32) * Wx234324808503234483920 * 签约成功后微信返回的委托代扣协议ID * </pre> */ @Required @XStreamAlias("contract_id") private String contractId; @Override protected void checkConstraints() throws WxPayException { } @Override protected void storeMap(Map<String, String> map) { map.put("body", body); map.put("detail", detail); map.put("attach", attach); map.put("out_trade_no", outTradeNo); map.put("total_fee", totalFee.toString()); map.put("fee_type", feeType); map.put("spbill_create_ip", spbillCreateIp); map.put("goods_tag", goodsTag); map.put("notify_url", notifyUrl); map.put("trade_type", tradeType); map.put("contract_id", contractId); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayApplyTradeBillV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayApplyTradeBillV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * <pre> * 微信支付-申请账单入参 * </pre> * * @author thinsstar */ @Data @NoArgsConstructor public class WxPayApplyTradeBillV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:账单日期 * 变量名:bill_date * 是否必填:是 * 类型:string[1,10] * 描述: * 格式YYYY-MM-DD * 仅支持三个月内的账单下载申请。 * 示例值:2019-06-11 * </pre> */ @SerializedName(value = "bill_date") private String billDate; /** * <pre> * 字段名:账单类型 * 变量名:bill_type * 是否必填:是 * 类型:string[1,32] * 描述: * 不填则默认是ALL * 枚举值: * ALL:返回当日所有订单信息(不含充值退款订单) * SUCCESS:返回当日成功支付的订单(不含充值退款订单) * REFUND:返回当日退款订单(不含充值退款订单) * 示例值:ALL * </pre> */ @SerializedName(value = "bill_type") private String billType; /** * <pre> * 字段名:压缩类型 * 变量名:tar_type * 是否必填:是 * 类型:string[1,32] * 描述: * 不填则默认是数据流 * 枚举值: * GZIP:返回格式为.gzip的压缩包账单 * 示例值:GZIP * </pre> */ @SerializedName(value = "tar_type") private String tarType; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayPartnerOrderCloseV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayPartnerOrderCloseV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * 服务商关闭订单请求对象类 * 文档见:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_3.shtml * * @author Pursuer * @version 1.0 * @date 2023/6/21 */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayPartnerOrderCloseV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:服务商商户号 * 变量名:sp_mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 服务商商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "sp_mchid") private String spMchId; /** * <pre> * 字段名:特约商户商户号 * 变量名:sp_mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 特约商户商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "sub_mchid") private String subMchId; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[6,32] * 描述: * 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 * 示例值:1217752501201407033233368018 * </pre> */ private transient String outTradeNo; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.*; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.List; /** * <pre> * 微信支付-申请退款请求参数 * </pre> * * @author thinsstar */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayRefundV3Request implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:微信支付订单号 * 变量名:transaction_id * 是否必填:与out_order_no二选一 * 类型:string[1, 32] * 描述: * 原支付交易对应的微信订单号。 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "transaction_id") private String transactionId; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:与transaction_id二选一 * 类型:string[1, 32] * 描述: * 原支付交易对应的商户订单号。 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "out_trade_no") private String outTradeNo; /** * <pre> * 字段名:商户退款单号 * 变量名:out_refund_no * 是否必填:是 * 类型:string[1, 64] * 描述: * 商户系统内部的退款单号,商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一退款单号多次请求只退一笔。 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "out_refund_no") private String outRefundNo; /** * <pre> * 字段名:退款原因 * 变量名:reason * 是否必填:否 * 类型:string[1, 80] * 描述: * 若商户传入,会在下发给用户的退款消息中体现退款原因。 * 示例值:商品已售完 * </pre> */ @SerializedName(value = "reason") private String reason; /** * <pre> * 字段名:退款结果回调url * 变量名:notify_url * 是否必填:否 * 类型:string[8, 256] * 描述: * 异步接收微信支付退款结果通知的回调地址,通知url必须为外网可访问的url,不能携带参数。 如果参数中传了notify_url,则商户平台上配置的回调地址将不会生效,优先回调当前传的这个地址。 * 示例值:https://weixin.qq.com * </pre> */ @SerializedName(value = "notify_url") private String notifyUrl; /** * <pre> * 字段名:订单金额 * 变量名:amount * 是否必填:是 * 类型:object * 描述: * 订单金额信息 * </pre> */ @SerializedName(value = "amount") private Amount amount; /** * <pre> * 字段名:退款商品 * 变量名:goods_detail * 是否必填:否 * 类型:array * 描述: * 指定商品退款需要传此参数,其他场景无需传递。 * </pre> */ @SerializedName(value = "goods_detail") private List<GoodsDetail> goodsDetails; @Data @NoArgsConstructor public static class Amount implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:退款金额 * 变量名:refund * 是否必填:是 * 类型:int * 描述: * 退款金额,币种的最小单位,只能为整数,不能超过原订单支付金额。 * 示例值:888 * </pre> */ @SerializedName(value = "refund") private Integer refund; /** * <pre> * 字段名:原订单金额 * 变量名:total * 是否必填:是 * 类型:int * 描述: * 原支付交易的订单总金额,币种的最小单位,只能为整数。 * 示例值:888 * </pre> */ @SerializedName(value = "total") private Integer total; /** * <pre> * 字段名:币类型 * 变量名:currency * 是否必填:是 * 类型:string[1, 16] * 描述: * 符合ISO 4217标准的三位字母代码,目前只支持人民币:CNY。 * 示例值:CNY * </pre> */ @SerializedName(value = "currency") private String currency; } @Data @NoArgsConstructor public static class GoodsDetail implements Serializable { private static final long serialVersionUID = -1L; /** * <pre> * 字段名:商户侧商品编码 * 变量名:merchant_goods_id * 是否必填:是 * 类型:string[1,32] * 描述: * 由半角的大小写字母、数字、中划线、下划线中的一种或几种组成。 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "merchant_goods_id") private String merchantGoodsId; /** * <pre> * 字段名:微信侧商品编码 * 变量名:wechatpay_goods_id * 是否必填:否 * 类型:string[1,32] * 描述: * 微信支付定义的统一商品编号(没有可不传)。 * 示例值:1001 * </pre> */ @SerializedName(value = "wechatpay_goods_id") private String wechatpayGoodsId; /** * <pre> * 字段名:商品名称 * 变量名:goods_name * 是否必填:否 * 类型:string[1,256] * 描述: * 商品的实际名称。 * 示例值:iPhone6s 16G * </pre> */ @SerializedName(value = "goods_name") private String goodsName; /** * <pre> * 字段名:商品单价 * 变量名:unit_price * 是否必填:是 * 类型:int * 描述: * 商品单价金额,单位为分。 * 示例值:528800 * </pre> */ @SerializedName(value = "unit_price") private Integer unitPrice; /** * <pre> * 字段名:商品退款金额 * 变量名:refund_amount * 是否必填:是 * 类型:int * 描述: * 商品退款金额,单位为分。 * 示例值:528800 * </pre> */ @SerializedName(value = "refund_amount") private Integer refundAmount; /** * <pre> * 字段名:商品退货数量 * 变量名:refund_quantity * 是否必填:是 * 类型:int * 描述: * 单品的退款数量。 * 示例值:1 * </pre> */ @SerializedName(value = "refund_quantity") private Integer refundQuantity; } /** * <pre> * 字段名:子商户的商户号 * 变量名:sub_mchid * 是否必填:是 * 类型:string[1, 32] * 描述: * 子商户商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "sub_mchid") private String subMchid; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxDepositUnifiedOrderRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxDepositUnifiedOrderRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * <pre> * 押金下单请求 * 详见:<a href="https://pay.weixin.qq.com/wiki/doc/api/deposit_sl.php?chapter=27_7&index=2">https://pay.weixin.qq.com/wiki/doc/api/deposit_sl.php?chapter=27_7&index=2</a> * </pre> * * @author Binary Wang * created on 2024-09-24 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxDepositUnifiedOrderRequest extends BaseWxPayRequest { /** * <pre> * 押金商品描述 * body * 是 * String(128) * 共享单车押金 * 押金商品描述 * </pre> */ @Required @XStreamAlias("body") private String body; /** * <pre> * 商户订单号 * out_trade_no * 是 * String(32) * 20150806125346 * 商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号 * </pre> */ @Required @XStreamAlias("out_trade_no") private String outTradeNo; /** * <pre> * 押金金额 * total_fee * 是 * Int * 99 * 押金金额,单位为分,只能为整数,详见支付金额 * </pre> */ @Required @XStreamAlias("total_fee") private Integer totalFee; /** * <pre> * 终端IP * spbill_create_ip * 是 * String(16) * 123.12.12.123 * 用户端实际ip * </pre> */ @Required @XStreamAlias("spbill_create_ip") private String spbillCreateIp; /** * <pre> * 通知地址 * notify_url * 是 * String(256) * http://www.weixin.qq.com/wxpay/pay.php * 接收微信支付异步通知回调地址 * </pre> */ @Required @XStreamAlias("notify_url") private String notifyUrl; /** * <pre> * 交易类型 * trade_type * 是 * String(16) * JSAPI * 交易类型,取值如下:JSAPI,NATIVE,APP,WAP * </pre> */ @Required @XStreamAlias("trade_type") private String tradeType; /** * <pre> * 用户标识 * openid * 否 * String(128) * oUpF8uMuAJO_M2pxb1Q9zNjWeS6o * trade_type=JSAPI时,此参数必传,用户在商户appid下的唯一标识。 * </pre> */ @XStreamAlias("openid") private String openid; /** * <pre> * 商品详情 * detail * 否 * String(8192) * 详情 * 商品名称明细列表 * </pre> */ @XStreamAlias("detail") private String detail; /** * <pre> * 附加数据 * attach * 否 * String(127) * 深圳分店 * 附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据 * </pre> */ @XStreamAlias("attach") private String attach; /** * <pre> * 货币类型 * fee_type * 否 * String(16) * CNY * 符合ISO 4217标准的三位字母代码,默认人民币:CNY * </pre> */ @XStreamAlias("fee_type") private String feeType; /** * <pre> * 交易起始时间 * time_start * 否 * String(14) * 20091225091010 * 订单生成时间,格式为yyyyMMddHHmmss * </pre> */ @XStreamAlias("time_start") private String timeStart; /** * <pre> * 交易结束时间 * time_expire * 否 * String(14) * 20091227091010 * 订单失效时间,格式为yyyyMMddHHmmss * </pre> */ @XStreamAlias("time_expire") private String timeExpire; @Override protected void checkConstraints() throws WxPayException { if ("JSAPI".equals(this.tradeType) && this.openid == null) { throw new WxPayException("当trade_type为JSAPI时,openid为必填参数"); } } @Override protected void storeMap(Map<String, String> map) { map.put("body", body); map.put("out_trade_no", outTradeNo); map.put("total_fee", totalFee.toString()); map.put("spbill_create_ip", spbillCreateIp); map.put("notify_url", notifyUrl); map.put("trade_type", tradeType); if (openid != null) { map.put("openid", openid); } if (detail != null) { map.put("detail", detail); } if (attach != null) { map.put("attach", attach); } if (feeType != null) { map.put("fee_type", feeType); } if (timeStart != null) { map.put("time_start", timeStart); } if (timeExpire != null) { map.put("time_expire", timeExpire); } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxSignQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxSignQueryRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import org.apache.commons.lang3.StringUtils; import java.util.Map; import java.util.Objects; /** * @author chenliang * created on 2021-08-02 5:23 下午 * <pre> * 微信签约状态查询入参 * </pre> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxSignQueryRequest extends BaseWxPayRequest { //方式1. 使用contract_id查 /** * <pre> * 字段名:委托代扣协议ID. * 变量名:contract_id * 是否必填:二选一 * 类型:String(32) * 示例值:1000005698 * 签约成功后由微信返回 * </pre> */ @XStreamAlias("contract_id") private String contractId; /** * <pre> * 字段名:接口版本号. * 变量名:version * 是否必填:是 * 类型:String(8) * 示例值:1.0 * 固定填写1.0, * </pre> */ @Required @XStreamAlias("version") private String version; //方式2. 使用plan_id和contract_code查 /** * <pre> * 字段名:模板ID. * 变量名:plan_id * 是否必填:二选一 * 类型:int * 示例值:123 * 代扣模板ID * </pre> */ @XStreamAlias("plan_id") private Integer planId; /** * <pre> * 字段名:签约协议号. * 变量名:contract_code * 是否必填:二选一 * 类型:String(32) * 示例值:12332343 * 商户侧唯一 * </pre> */ @XStreamAlias("contract_code") private String contractCode; @Override protected boolean needNonceStr() { return false; } @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isNotBlank(contractId) && (Objects.nonNull(planId) || StringUtils.isNotBlank(contractCode))) { throw new WxPayException("contractId 和 planId&contractCode 不能同时存在或同时为空,必须二选一"); } } @Override protected void storeMap(Map<String, String> map) { map.put("contract_id", contractId); map.put("version", version); if (Objects.nonNull(planId)) { map.put("plan_id", planId.toString()); } map.put("contract_code", contractCode); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundQueryRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import org.apache.commons.lang3.StringUtils; import java.util.Map; /** * <pre> * Created by Binary Wang on 2016-11-24. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayRefundQueryRequest extends BaseWxPayRequest { /** * <pre> * 设备号 * device_info * 否 * String(32) * 013467007045764 * 商户自定义的终端设备号,如门店编号、设备的ID等 * </pre> */ @XStreamAlias("device_info") private String deviceInfo; //************以下四选一************ /** * <pre> * 微信订单号 * transaction_id * String(32) * 1217752501201407033233368018 * 微信订单号 * </pre> */ @XStreamAlias("transaction_id") private String transactionId; /** * <pre> * 商户订单号 * out_trade_no * String(32) * 1217752501201407033233368018 * 商户系统内部的订单号 * </pre> */ @XStreamAlias("out_trade_no") private String outTradeNo; /** * <pre> * 商户退款单号 * out_refund_no * String(32) * 1217752501201407033233368018 * 商户侧传给微信的退款单号 * </pre> */ @XStreamAlias("out_refund_no") private String outRefundNo; /** * <pre> * 微信退款单号 * refund_id * String(28) * 1217752501201407033233368018 * 微信生成的退款单号,在申请退款接口有返回 * </pre> */ @XStreamAlias("refund_id") private String refundId; @Override protected void checkConstraints() throws WxPayException { if ((StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo) && StringUtils.isBlank(outRefundNo) && StringUtils.isBlank(refundId)) || (StringUtils.isNotBlank(transactionId) && StringUtils.isNotBlank(outTradeNo) && StringUtils.isNotBlank(outRefundNo) && StringUtils.isNotBlank(refundId))) { throw new WxPayException("transactionId,outRefundNo,transactionId,refundId 必须四选一"); } } @Override protected void storeMap(Map<String, String> map) { map.put("device_info", deviceInfo); map.put("transaction_id", transactionId); map.put("out_trade_no", outTradeNo); map.put("out_refund_no", outRefundNo); map.put("refund_id", refundId); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderQueryRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import org.apache.commons.lang3.StringUtils; import java.util.Map; /** * <pre> * 订单查询请求对象 * Created by Binary Wang on 2016-10-24. * 注释中各行每个字段描述对应如下: * <li>字段名 * <li>变量名 * <li>是否必填 * <li>类型 * <li>示例值 * <li>描述 * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayOrderQueryRequest extends BaseWxPayRequest { /** * <pre> * 字段名:接口版本号. * 变量名:version * 是否必填:单品优惠必填 * 类型:String(32) * 示例值:1.0 * 描述:单品优惠新增字段,区分原接口,固定填写1.0, * 查单接口上传version后查询结果才返回单品信息,不上传不返回单品信息。 * 更多信息,详见文档:https://pay.weixin.qq.com/wiki/doc/api/danpin.php?chapter=9_102&index=2 * </pre> */ @XStreamAlias("version") private String version; /** * <pre> * 微信订单号 * transaction_id * 二选一 * String(32) * 1009660380201506130728806387 * 微信的订单号,优先使用 * </pre> */ @XStreamAlias("transaction_id") private String transactionId; /** * <pre> * 商户订单号 * out_trade_no * 二选一 * String(32) * 20150806125346 * 商户系统内部的订单号,当没提供transaction_id时需要传这个。 * </pre> */ @XStreamAlias("out_trade_no") private String outTradeNo; @Override protected void checkConstraints() throws WxPayException { if ((StringUtils.isBlank(transactionId) && StringUtils.isBlank(outTradeNo)) || (StringUtils.isNotBlank(transactionId) && StringUtils.isNotBlank(outTradeNo))) { throw new WxPayException("transaction_id 和 out_trade_no 不能同时存在或同时为空,必须二选一"); } } @Override protected void storeMap(Map<String, String> map) { map.put("version", version); map.put("transaction_id", transactionId); map.put("out_trade_no", outTradeNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayRefundRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.config.WxPayConfig; import com.github.binarywang.wxpay.constant.WxPayConstants.RefundAccountSource; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import com.thoughtworks.xstream.annotations.XStreamConverter; import lombok.*; import lombok.experimental.Accessors; import me.chanjar.weixin.common.annotation.Required; import me.chanjar.weixin.common.util.xml.XStreamCDataConverter; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import java.util.Arrays; import java.util.Map; /** * <pre> * 微信支付-申请退款请求参数 * Created by Binary Wang on 2016-10-08. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") @Accessors(chain = true) public class WxPayRefundRequest extends BaseWxPayRequest { private static final long serialVersionUID = 522565152886671848L; private static final String[] REFUND_ACCOUNT = new String[]{ RefundAccountSource.RECHARGE_FUNDS, RefundAccountSource.UNSETTLED_FUNDS}; /** * <pre> * 字段名:设备号. * 变量名:device_info * 是否必填:否 * 类型:String(32) * 示例值:13467007045764 * 描述:终端设备号 * </pre> */ @XStreamAlias("device_info") private String deviceInfo; /** * <pre> * 字段名:微信订单号. * 变量名:transaction_id * 是否必填:跟out_trade_no二选一 * 类型:String(28) * 示例值:1217752501201400000000000000 * 描述:微信生成的订单号,在支付通知中有返回 * </pre> */ @XStreamAlias("transaction_id") private String transactionId; /** * <pre> * 字段名:商户订单号. * 变量名:out_trade_no * 是否必填:跟transaction_id二选一 * 类型:String(32) * 示例值:1217752501201400000000000000 * 描述:商户侧传给微信的订单号 * </pre> */ @XStreamAlias("out_trade_no") private String outTradeNo; /** * <pre> * 字段名:商户退款单号. * 变量名:out_refund_no * 是否必填:是 * 类型:String(32) * 示例值:1217752501201400000000000000 * 描述:商户系统内部的退款单号,商户系统内部唯一,同一退款单号多次请求只退一笔 * </pre> */ @Required @XStreamAlias("out_refund_no") private String outRefundNo; /** * <pre> * 字段名:订单金额. * 变量名:total_fee * 是否必填:是 * 类型:Int * 示例值:100 * 描述:订单总金额,单位为分,只能为整数,详见支付金额 * </pre> */ @Required @XStreamAlias("total_fee") private Integer totalFee; /** * <pre> * 字段名:退款金额. * 变量名:refund_fee * 是否必填:是 * 类型:Int * 示例值:100 * 描述:退款总金额,订单总金额,单位为分,只能为整数,详见支付金额 * </pre> */ @Required @XStreamAlias("refund_fee") private Integer refundFee; /** * <pre> * 字段名:货币种类. * 变量名:refund_fee_type * 是否必填:否 * 类型:String(8) * 示例值:CNY * 描述:货币类型,符合ISO 4217标准的三位字母代码,默认人民币:CNY,其他值列表详见货币类型 * </pre> */ @XStreamAlias("refund_fee_type") private String refundFeeType; /** * <pre> * 字段名:操作员. * 变量名:op_user_id * 是否必填:是 * 类型:String(32) * 示例值:1900000109 * 描述:操作员帐号, 默认为商户号 * </pre> */ @XStreamAlias("op_user_id") private String opUserId; /** * <pre> * 字段名:退款资金来源. * 变量名:refund_account * 是否必填:否 * 类型:String(30) * 示例值:REFUND_SOURCE_RECHARGE_FUNDS * 描述:仅针对老资金流商户使用, * <li>REFUND_SOURCE_UNSETTLED_FUNDS---未结算资金退款(默认使用未结算资金退款), * <li>REFUND_SOURCE_RECHARGE_FUNDS---可用余额退款 * </pre> */ @XStreamAlias("refund_account") private String refundAccount; /** * <pre> * 字段名:退款原因. * 变量名:refund_account * 是否必填:否 * 类型:String(80) * 示例值:商品已售完 * 描述:若商户传入,会在下发给用户的退款消息中体现退款原因 * </pre> */ @XStreamAlias("refund_desc") private String refundDesc; /** * <pre> * 字段名:退款结果通知url. * 变量名:notify_url * 是否必填:否 * 类型:String(256) * 示例值:https://weixin.qq.com/notify/ * 描述: 异步接收微信支付退款结果通知的回调地址,通知URL必须为外网可访问的url,不允许带参数 * 如果参数中传了notify_url,则商户平台上配置的回调地址将不会生效。 * </pre> */ @XStreamAlias("notify_url") private String notifyUrl; /** * <pre> * 字段名:商品详情 * 变量名:detail * 类型:否 * 示例值:String(6000) * 退款包含的商品列表信息detail字段列表说明: * * 字段名 变量名 必填 类型 示例值 描述 * 商品列表 goods_detail 是 String 示例见下文 商品信息,使用Json数组格式提交 * 商品列表goods_detail字段列表说明: * * 字段名 变量名 必填 类型 示例值 描述 * 商品编码 goods_id 是 String(32) 商品编码 由半角的大小写字母、数字、中划线、下划线中的一种或几种组成 * 微信侧商品编码 wxpay_goods_id 否 String(32) 1001 微信支付定义的统一商品编号(没有可不传) * 商品名称 goods_name 否 String(256) iPhone6s 16G 商品的实际名称 * 商品退款金额 refund_amount 是 int 528800 商品退款金额 * 商品退货数量 refund_quantity 是 int 1 单品的退款数量 * 商品单价 price 是 int 528800 单位为:分。如果商户有优惠,需传输商户优惠后的单价(例如:用户对一笔100元的订单使用了商场发的优惠券100-50,则活动商品的单价应为原单价-50) * detail字段值举例如下: * * { * "goods_detail": [ * { * "goods_id": "商品编码", * "wxpay_goods_id": "1001", * "goods_name": "iPhone6s 16G", * "refund_amount": 528800, * "refund_quantity": 1, * "price": 528800 * }, * { * "goods_id": "商品编码", * "wxpay_goods_id": "1001", * "goods_name": "iPhone6s 16G", * "refund_amount": 528800, * "refund_quantity": 1, * "price": 608800 * } * ] * } * 描述:退款包含的商品列表信息,全额退款可不传,必须按照规范上传,JSON格式 * </pre> */ @XStreamAlias("detail") @XStreamConverter(value = XStreamCDataConverter.class) private String detail; @Override public void checkAndSign(WxPayConfig config) throws WxPayException { if (StringUtils.isBlank(this.getOpUserId())) { this.setOpUserId(config.getMchId()); } super.checkAndSign(config); } @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isNotBlank(this.getRefundAccount())) { if (!ArrayUtils.contains(REFUND_ACCOUNT, this.getRefundAccount())) { throw new WxPayException( String.format("refund_account目前必须为%s其中之一,实际值:%s", Arrays.toString(REFUND_ACCOUNT), this.getRefundAccount())); } } if (StringUtils.isBlank(this.getOutTradeNo()) && StringUtils.isBlank(this.getTransactionId())) { throw new WxPayException("transaction_id 和 out_trade_no 不能同时为空,必须提供一个"); } } @Override protected void storeMap(Map<String, String> map) { map.put("device_info", deviceInfo); map.put("transaction_id", transactionId); map.put("out_trade_no", outTradeNo); map.put("out_refund_no", outRefundNo); map.put("total_fee", totalFee.toString()); map.put("refund_fee", refundFee.toString()); map.put("refund_fee_type", refundFeeType); map.put("op_user_id", opUserId); map.put("refund_account", refundAccount); map.put("refund_desc", refundDesc); map.put("notify_url", notifyUrl); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderQueryV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderQueryV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * <pre> * 订单查询请求对象 * </pre> * * @author thinsstar */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayOrderQueryV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:直连商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 直连商户的商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "mchid") private String mchid; /** * <pre> * 字段名:微信支付订单号 * 变量名:transaction_id * 是否必填:是 * 类型:string[1,32] * 描述: * 微信支付系统生成的订单号 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "transaction_id") private String transactionId; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[1,32] * 描述: * 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。 * 特殊规则:最小字符长度为6 * 示例值:1217752501201407033233368018 * </pre> */ @SerializedName(value = "out_trade_no") private String outTradeNo; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxMaEntrustRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxMaEntrustRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.annotations.SerializedName; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * @author chenliang * created on 2021-08-02 5:13 下午 * <pre> * 小程序纯签约入参 * </pre> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxMaEntrustRequest extends BaseWxPayRequest { /** * <pre> * 协议模板ID * plan_id * 是 * String(28) * 12535 * 协议模板ID,分为首次签约,支付中签约,重新签约 * </pre> */ @Required @SerializedName(value = "plan_id") @XStreamAlias("plan_id") private String planId; /** * <pre> * 签约协议号 * contract_code * 是 * String(32) * 100000 * 商户侧签约协议号,由商户生成,只能是数字,大小写字母组成 * </pre> */ @Required @SerializedName(value = "contract_code") @XStreamAlias("contract_code") private String contractCode; /** * <pre> * 请求序列号 * request_serial * 是 * int(64) * 1000 * 商户请求签约时的序列号,要求唯一性,禁止使用0开头的,用户排序,纯数字 * </pre> */ @Required @SerializedName(value = "request_serial") @XStreamAlias("request_serial") private Long requestSerial; /** * <pre> * 用户账户展示名称 * contract_display_account * 是 * string(32) * 微信代扣 * 签约用户的名称,用户页面展示,不支持符号表情 * </pre> */ @Required @SerializedName(value = "contract_display_account") @XStreamAlias("contract_display_account") private String contractDisplayAccount; /** * <pre> * 回调通知URL * notify_url * 是 * string(256) * https://weixin.qq.com * 用于接收签约成功消息的回调通知地址 * </pre> */ @Required @SerializedName(value = "notify_url") @XStreamAlias("notify_url") private String notifyUrl; /** * <pre> * 版本号 * sign * 是 * string(8) * 1.0 * 固定值1.0 * </pre> */ @Required @XStreamAlias("version") private String version; /** * <pre> * 时间戳 * timestamp * 是 * string(10) * 1414488825 * 系统当前时间,10位 * </pre> */ @Required @XStreamAlias("timestamp") private String timestamp; /** * <pre> * 商户侧用户标识 * outerId * 否 * String * 陈*(141448825) * 用户在商户侧的标识 * </pre> */ @XStreamAlias("outerid") private String outerId; @Override protected void checkConstraints() throws WxPayException { } /** * 是否需要nonce_str */ @Override protected boolean needNonceStr() { return false; } @Override protected void storeMap(Map<String, String> map) { map.put("plan_id", planId); map.put("contract_code", contractCode); map.put("request_serial", String.valueOf(requestSerial)); map.put("contract_display_account", contractDisplayAccount); map.put("notify_url", notifyUrl); map.put("timestamp", timestamp); map.put("outerid", outerId); } @Override public String toString() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); Gson gson = gsonBuilder.create(); return gson.toJson(this); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxH5EntrustRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxH5EntrustRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * @author chenliang * created on 2021-08-02 5:12 下午 * * <pre> * 微信h5纯签约入参 * </pre> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxH5EntrustRequest extends BaseWxPayRequest { /** * <pre> * 协议模板ID * plan_id * 是 * String(28) * 12535 * 协议模板ID,分为首次签约,支付中签约,重新签约 * </pre> */ @Required @XStreamAlias("plan_id") private String planId; /** * <pre> * 签约协议号 * contract_code * 是 * String(32) * 100000 * 商户侧签约协议号,由商户生成,只能是数字,大小写字母组成 * </pre> */ @Required @XStreamAlias("contract_code") private String contractCode; /** * <pre> * 请求序列号 * request_serial * 是 * int(64) * 1000 * 商户请求签约时的序列号,要求唯一性,禁止使用0开头的,用户排序,纯数字 * </pre> */ @Required @XStreamAlias("request_serial") private Long requestSerial; /** * <pre> * 用户账户展示名称 * contract_display_account * 是 * string(32) * 微信代扣 * 签约用户的名称,用户页面展示,不支持符号表情 * </pre> */ @Required @XStreamAlias("contract_display_account") private String contractDisplayAccount; /** * <pre> * 回调通知URL * notify_url * 是 * string(256) * https://weixin.qq.com * 用于接收签约成功消息的回调通知地址 * </pre> */ @Required @XStreamAlias("notify_url") private String notifyUrl; /** * <pre> * 版本号 * sign * 是 * string(8) * 1.0 * 固定值1.0 * </pre> */ @Required @XStreamAlias("version") private String version; /** * <pre> * 时间戳 * timestamp * 是 * string(10) * 1414488825 * 系统当前时间,10位 * </pre> */ @Required @XStreamAlias("timestamp") private String timestamp; /** * <pre> * 客户端IP * clientip * 是 * string(32) * 127.0.0.1 * 用户客户端的IP地址 * </pre> */ @Required @XStreamAlias("clientip") private String clientIp; /** * <pre> * 回调应用appid * return_appid * 否 * string(32) * wxcbda96de0b16 * 用来控制签约页面结束后的返回路径, * 当指定该字段是,签约成功将返回return_appid指定的APP应用,如果不填且签约发起的浏览器ua可被微信识别, * 则挑战到浏览器,否则留在微信 * </pre> */ @XStreamAlias("return_appid") private String returnAppid; /** * <pre> * 商户测用户标识 * outerid * 否 * string(32) * 陈*(10000001) * 用于多账号签约,值与contract_display_account一样就行 * </pre> */ @XStreamAlias("outerid") private String outerId; /** * 是否需要nonce_str */ @Override protected boolean needNonceStr() { return false; } @Override protected void checkConstraints() throws WxPayException { } @Override protected void storeMap(Map<String, String> map) { map.put("plan_id", planId); map.put("contract_code", contractCode); map.put("request_serial", String.valueOf(requestSerial)); map.put("contract_display_account", contractDisplayAccount); map.put("notify_url", notifyUrl); map.put("version", version); map.put("timestamp", timestamp); map.put("clientip", clientIp); map.put("return_appid", returnAppid); map.put("outerid", outerId); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayQueryExchangeRateRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayQueryExchangeRateRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import lombok.experimental.Accessors; import java.util.Map; /** * 查询汇率请求. * * @author <a href="https://github.com/binarywang">Binary Wang</a> * created on 2020-05-23 */ @Data @EqualsAndHashCode(callSuper = true) @Builder @Accessors(chain = true) @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayQueryExchangeRateRequest extends BaseWxPayRequest { private static final long serialVersionUID = -8796516942563060554L; /** * 币种 * fee_type * 是 * String(10) * USD * 外币币种 */ @XStreamAlias("fee_type") private String feeType; /** * 日期 * date * 是 * String(14) * 20150807 * 格式为yyyyMMdd,如2009年12月25日表示为20091225。时区为GMT+8 beijing */ @XStreamAlias("date") private String date; @Override protected void checkConstraints() throws WxPayException { } @Override protected void storeMap(Map<String, String> map) { } @Override protected boolean needNonceStr() { return false; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderReverseV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderReverseV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * V3撤销订单请求对象类 * @author <a href="https://github.com/xxm1995">DaxPay</a> * @date 2024/7/29 */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayOrderReverseV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:应用ID * 变量名:appid * 是否必填:是 * 类型:string[1,32] * 描述: * 由微信生成的应用ID,全局唯一。请求统一下单接口时请注意APPID的应用属性,例如公众号场景下,需使用应用属性为公众号的APPID * 示例值:wxd678efh567hg6787 * </pre> */ @SerializedName(value = "appid") protected String appid; /** * <pre> * 字段名:直连商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 直连商户的商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "mchid") protected String mchid; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[6,32] * 描述: * 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 * 示例值:1217752501201407033233368018 * </pre> */ private transient String outTradeNo; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPaySendMiniProgramRedpackRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPaySendMiniProgramRedpackRequest.java
package com.github.binarywang.wxpay.bean.request; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import lombok.experimental.Accessors; import java.util.Map; /** * 发送小程序红包请求参数对象. * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor @Builder @XStreamAlias("xml") @Accessors(chain = true) public class WxPaySendMiniProgramRedpackRequest extends BaseWxPayRequest { private static final long serialVersionUID = -2035425086824987567L; @Override protected String[] getIgnoredParamsForSign() { return new String[]{"sign_type", "sub_appid"}; } /** * mch_billno. * 商户订单号(每个订单号必须唯一) * 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。 */ @XStreamAlias("mch_billno") private String mchBillNo; /** * send_name. * 商户名称 * 红包发送者名称 */ @XStreamAlias("send_name") private String sendName; /** * re_openid. * 接受红包的用户 用户在wxappid下的openid */ @XStreamAlias("re_openid") private String reOpenid; /** * total_amount. * 红包总额 */ @XStreamAlias("total_amount") private Integer totalAmount; /** * total_num * 红包发放总人数 */ @XStreamAlias("total_num") private Integer totalNum; /** * wishing. * 红包祝福语 */ @XStreamAlias("wishing") private String wishing; /** * act_name. * 活动名称 */ @XStreamAlias("act_name") private String actName; /** * remark. * 备注 */ @XStreamAlias("remark") private String remark; /** * 通知用户形式 . * 通过JSAPI方式领取红包,小程序红包固定传MINI_PROGRAM_JSAPI */ @XStreamAlias("notify_way") private String notifyWay = "MINI_PROGRAM_JSAPI"; /** * <pre> * 发放红包使用场景,红包金额大于200时必传 * PRODUCT_1:商品促销 * PRODUCT_2:抽奖 * PRODUCT_3:虚拟物品兑奖 * PRODUCT_4:企业内部福利 * PRODUCT_5:渠道分润 * PRODUCT_6:保险回馈 * PRODUCT_7:彩票派奖 * PRODUCT_8:税务刮奖 * </pre> */ @XStreamAlias("scene_id") private String sceneId; /** * wxappid. * 微信分配的公众账号ID(企业号corpid即为此appId)。 * 接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的), * 不能为APP的appid(在open.weixin.qq.com申请的) */ @XStreamAlias("wxappid") private String wxAppid; @Override protected void checkConstraints() { } @Override protected void storeMap(Map<String, String> map) { map.put("mch_billno", mchBillNo); map.put("send_name", sendName); map.put("re_openid", reOpenid); map.put("total_amount", totalAmount.toString()); map.put("total_num", totalNum.toString()); map.put("wishing", wishing); map.put("act_name", actName); map.put("remark", remark); map.put("notify_way", notifyWay); map.put("scene_id", sceneId); map.put("wxappid", wxAppid); } @Override public String getAppid() { return this.wxAppid; } @Override public void setAppid(String appid) { this.wxAppid = appid; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayApplyFundFlowBillV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayApplyFundFlowBillV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * <pre> * 微信支付-申请账单入参 * </pre> * * @author thinsstar */ @Data @NoArgsConstructor public class WxPayApplyFundFlowBillV3Request implements Serializable { /** * 账户类型 */ public static class AccountType { /** * BASIC:基本账户 */ public static final String BASIC = "BASIC"; /** * OPERATION:运营账户 */ public static final String OPERATION = "OPERATION"; /** * FEES:手续费账户 */ public static final String FEES = "FEES"; } private static final long serialVersionUID = 1L; /** * <pre> * 字段名:账单日期 * 变量名:bill_date * 是否必填:是 * 类型:string[1,10] * 描述: * 格式YYYY-MM-DD * 仅支持三个月内的账单下载申请。 * 示例值:2019-06-11 * </pre> */ @SerializedName(value = "bill_date") private String billDate; /** * <pre> * 字段名:资金账户类型 * 变量名:account_type * 是否必填:是 * 类型:string[1,32] * 描述: * 不填则默认是BASIC * 枚举值: * BASIC:基本账户 * OPERATION:运营账户 * FEES:手续费账户 * 示例值:BASIC * </pre> */ @SerializedName(value = "account_type") private String accountType; /** * <pre> * 字段名:压缩类型 * 变量名:tar_type * 是否必填:是 * 类型:string[1,32] * 描述: * 不填则默认是数据流 * 枚举值: * GZIP:返回格式为.gzip的压缩包账单 * 示例值:GZIP * </pre> */ @SerializedName(value = "tar_type") private String tarType; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderV3GlobalRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderV3GlobalRequest.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * <pre> * 境外微信支付统一下单请求参数对象. * 参考文档:https://pay.weixin.qq.com/doc/global/v3/zh/4013014223 * </pre> * * @author Binary Wang */ @Data @NoArgsConstructor @Accessors(chain = true) @EqualsAndHashCode(callSuper = true) public class WxPayUnifiedOrderV3GlobalRequest extends WxPayUnifiedOrderV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:交易类型 * 变量名:trade_type * 是否必填:是 * 类型:string[1,16] * 描述: * 交易类型,取值如下: * JSAPI--JSAPI支付 * NATIVE--Native支付 * APP--APP支付 * H5--H5支付 * 示例值:JSAPI * </pre> */ @SerializedName(value = "trade_type") private String tradeType; /** * <pre> * 字段名:商户类目 * 变量名:merchant_category_code * 是否必填:是 * 类型:string[1,32] * 描述: * 商户类目,境外商户必填 * 示例值:5812 * </pre> */ @SerializedName(value = "merchant_category_code") private String merchantCategoryCode; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderCloseV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayOrderCloseV3Request.java
package com.github.binarywang.wxpay.bean.request; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * <pre> * 关闭订单请求对象类 * </pre> * * @author thinsstar */ @Data @NoArgsConstructor @Accessors(chain = true) public class WxPayOrderCloseV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:直连商户号 * 变量名:mchid * 是否必填:是 * 类型:string[1,32] * 描述: * 直连商户的商户号,由微信支付生成并下发。 * 示例值:1230000109 * </pre> */ @SerializedName(value = "mchid") private String mchid; /** * <pre> * 字段名:商户订单号 * 变量名:out_trade_no * 是否必填:是 * 类型:string[6,32] * 描述: * 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一 * 示例值:1217752501201407033233368018 * </pre> */ private transient String outTradeNo; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayDownloadFundFlowRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayDownloadFundFlowRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import java.util.Arrays; import java.util.Map; /** * <pre> * 微信支付下载资金账单请求参数类 * Created by cwivan on 2018-08-02. * </pre> * * @author <a href="https://github.com/cwivan">cwivan</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxPayDownloadFundFlowRequest extends BaseWxPayRequest { /** * 账户类型 */ public static class AccountType { /** * BASIC:基本账户 */ public static final String BASIC = "Basic"; /** * OPERATION:运营账户 */ public static final String OPERATION = "Operation"; /** * FEES:手续费账户 */ public static final String FEES = "Fees"; } private static final long serialVersionUID = -8352717499328292952L; private static final String[] ACCOUNT_TYPES = new String[]{AccountType.BASIC, AccountType.OPERATION, AccountType.FEES}; private static final String SIGN_TYPE_HMAC_SHA256 = "HMAC-SHA256"; private static final String TAR_TYPE_GZIP = "GZIP"; /** * <pre> * 对账单日期 * bill_date * 是 * String(8) * 20140603 * 下载对账单的日期,格式:20140603 * </pre> */ @Required @XStreamAlias("bill_date") private String billDate; /** * <pre> * 资金账户类型 * account_type * 是 * Basic * String(8) * --Basic,基本账户 * --Operation,运营账户 * --Fees,手续费账户 * </pre> */ @Required @XStreamAlias("account_type") private String accountType; /** * <pre> * 压缩账单 * tar_type * 否 * String(8) * GZIP * 非必传参数,固定值:GZIP,返回格式为.gzip的压缩包账单。不传则默认为数据流形式。 * </pre> */ @XStreamAlias("tar_type") private String tarType; @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isNotBlank(this.getTarType()) && !TAR_TYPE_GZIP.equals(this.getTarType())) { throw new WxPayException("tar_type值如果存在,只能为GZIP"); } if (!ArrayUtils.contains(ACCOUNT_TYPES, this.getAccountType())) { throw new WxPayException(String.format("account_type必须为%s其中之一,实际值:%s", Arrays.toString(ACCOUNT_TYPES), this.getAccountType())); } /* 目前仅支持HMAC-SHA256 */ this.setSignType(SIGN_TYPE_HMAC_SHA256); } @Override protected void storeMap(Map<String, String> map) { map.put("bill_date", billDate); map.put("account_type", accountType); map.put("tar_type", tarType); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxWithholdOrderQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxWithholdOrderQueryRequest.java
package com.github.binarywang.wxpay.bean.request; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import org.apache.commons.lang3.StringUtils; import java.util.Map; /** * @author chenliang * created on 2021-08-02 5:25 下午 * * <pre>代扣订单查询参数</pre> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class WxWithholdOrderQueryRequest extends BaseWxPayRequest { /** * <pre> * 字段名:微信订单号. * 变量名:transaction_id * 是否必填:二选一 * 类型:String(32) * 示例值:1000005698 * 微信生成的单号,支付通知中返回 * </pre> */ @XStreamAlias("transaction_id") private String transactionId; /** * <pre> * 字段名:商户订单号. * 变量名:out_trade_no * 是否必填:二选一 * 类型:String(32) * 示例值:1000005698 * 商户系统内部订单号 * </pre> */ @XStreamAlias("out_trade_no") private String outTradeNo; @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isNotBlank(transactionId) && StringUtils.isNotBlank(outTradeNo)) { throw new WxPayException("transactionId 和 outTradeNo 不能同时存在或同时为空,必须二选一"); } } @Override protected void storeMap(Map<String, String> map) { map.put("transaction_id", transactionId); map.put("out_trade_no", outTradeNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/ApplymentStateQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/ApplymentStateQueryResult.java
package com.github.binarywang.wxpay.bean.applyment; import com.github.binarywang.wxpay.bean.applyment.enums.ApplymentStateEnum; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.List; /** * 查询申请单状态返回对象信息 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class ApplymentStateQueryResult implements Serializable { private static final long serialVersionUID = 6539090917423486409L; /** * 业务申请编号 */ @SerializedName("business_code") private String businessCode; /** * 微信支付申请单号 */ @SerializedName("applyment_id") private String applymentId; /** * 特约商户号 */ @SerializedName("sub_mchid") private String subMchid; /** * 超级管理员签约链接 */ @SerializedName("sign_url") private String signUrl; /** * 申请单状态 */ @SerializedName("applyment_state") private ApplymentStateEnum applymentState; /** * 申请状态描述 */ @SerializedName("applyment_state_msg") private String applymentStateMsg; /** * 驳回原因详情 */ @SerializedName("audit_detail") private List<AuditDetail> auditDetail; /** * 驳回原因详情 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class AuditDetail implements Serializable { private static final long serialVersionUID = 8006953382311911508L; /** * 字段名 */ @SerializedName("field") private String field; /** * 字段名称 */ @SerializedName("field_name") private String fieldName; /** * 驳回原因 */ @SerializedName("reject_reason") private String rejectReason; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/SettlementModifyStateQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/SettlementModifyStateQueryResult.java
package com.github.binarywang.wxpay.bean.applyment; import com.github.binarywang.wxpay.bean.applyment.enums.AccountTypeEnum; import com.github.binarywang.wxpay.bean.applyment.enums.SettlementVerifyStateEnum; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class SettlementModifyStateQueryResult implements Serializable { private static final long serialVersionUID = 464614116838248296L; /** * 开户名称 */ @SerializedName("account_name") private String accountName; /** * 账户类型 */ @SerializedName("account_type") private AccountTypeEnum accountType; /** * 开户银行 */ @SerializedName("account_bank") private String accountBank; /** * 开户银行全称(含支行) */ @SerializedName("bank_name") private String bankName; /** * 开户银行联行号 */ @SerializedName("bank_branch_id") private String bankBranchId; /** * 银行账号 */ @SerializedName("account_number") private String accountNumber; /** * 审核状态 * @see SettlementVerifyStateEnum */ @SerializedName("verify_result") private SettlementVerifyStateEnum verifyResult; /** * 审核驳回原因 */ @SerializedName("verify_fail_reason") private String verifyFailReason; /** * 审核结果更新时间 */ @SerializedName("verify_finish_time") private String verifyFinishTime; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/SettlementApplicationResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/SettlementApplicationResult.java
package com.github.binarywang.wxpay.bean.applyment; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * 查询结算账户修改申请状态 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class SettlementApplicationResult implements Serializable { private static final long serialVersionUID = 1L; /** * 开户名称 */ @SerializedName("account_name") private String accountName; /** * 账户类型 */ @SerializedName("account_type") private String accountType; /** * 开户银行 */ @SerializedName("account_bank") private String accountBank; /** * 开户银行全称(含支行) */ @SerializedName("bank_name") private String bankName; /** * 开户银行联行号 */ @SerializedName("bank_branch_id") private String bankBranchId; /** * 银行账号 */ @SerializedName("account_number") private String accountNumber; /** * 审核状态 */ @SerializedName("verify_result") private String verifyResult; /** * 审核驳回原因 */ @SerializedName("verify_fail_reason") private String verifyFailReason; /** * 审核结果更新时间 */ @SerializedName("verify_finish_time") private String verifyFinishTime; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/WxPayApplyment4SubCreateRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/WxPayApplyment4SubCreateRequest.java
package com.github.binarywang.wxpay.bean.applyment; import com.github.binarywang.wxpay.bean.applyment.enums.*; import com.github.binarywang.wxpay.v3.SpecEncrypt; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.List; /** * 特约商户进件 提交申请对象 * * @author zhouyongshen */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class WxPayApplyment4SubCreateRequest implements Serializable { private static final long serialVersionUID = 4104022969945059126L; /** * 业务申请编号 */ @SerializedName("business_code") private String businessCode; /** * 超级管理员信息 */ @SerializedName("contact_info") @SpecEncrypt private ContactInfo contactInfo; /** * 主体资料 */ @SerializedName("subject_info") @SpecEncrypt private SubjectInfo subjectInfo; /** * 经营资料 */ @SerializedName("business_info") private BusinessInfo businessInfo; /** * 结算规则 */ @SerializedName("settlement_info") private SettlementInfo settlementInfo; /** * 结算银行账户 */ @SerializedName("bank_account_info") @SpecEncrypt private BankAccountInfo bankAccountInfo; /** * 补充材料 */ @SerializedName("addition_info") private AdditionInfo additionInfo; /** * 超级管理员需在开户后进行签约,并接收日常重要管理信息和进行资金操作,请确定其为商户法定代表人或负责人。 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class ContactInfo implements Serializable { private static final long serialVersionUID = -9087348002744428474L; /** * 超级管理员类型 * 1、主体为“个体工商户/企业/政府机关/事业单位/社会组织”,可选择:LEGAL:经营者/法人,SUPER:经办人 。(经办人:经商户授权办理微信支付业务的人员)。 * 枚举值: * LEGAL:经营者/法人 * SUPER:经办人 * 示例值:LEGAL */ @SerializedName("contact_type") private String contactType; /** * 超级管理员姓名 */ @SerializedName("contact_name") @SpecEncrypt private String contactName; /** * 超级管理员证件类型 * 当超级管理员类型是经办人时,请上传超级管理员证件类型。 * IDENTIFICATION_TYPE_IDCARD:中国大陆居民-身份证 * IDENTIFICATION_TYPE_OVERSEA_PASSPORT:其他国家或地区居民-护照 * IDENTIFICATION_TYPE_HONGKONG_PASSPORT:中国香港居民-来往内地通行证 * IDENTIFICATION_TYPE_MACAO_PASSPORT:中国澳门居民-来往内地通行证 * IDENTIFICATION_TYPE_TAIWAN_PASSPORT:中国台湾居民-来往大陆通行证 * IDENTIFICATION_TYPE_FOREIGN_RESIDENT:外国人居留证 * IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT:港澳居民证 * IDENTIFICATION_TYPE_TAIWAN_RESIDENT:台湾居民证 * 示例值:IDENTIFICATION_TYPE_IDCARD */ @SerializedName("contact_id_doc_type") private String contactIdDocType; /** * 超级管理员身份证件号码 * 1、“超级管理员身份证号码”与“超级管理员微信openid”,二选一必填。 * 2、超级管理员签约时,校验微信号绑定的银行卡实名信息,是否与该证件号码一致。 * 3、可传身份证、来往内地通行证、来往大陆通行证、护照等证件号码。 */ @SerializedName("contact_id_number") @SpecEncrypt private String contactIdNumber; /** * 超级管理员证件正面照片 * 1、当超级管理员类型是经办人时,请上传超级管理员证件的正面照片。 * 2、若证件类型为身份证,请上传人像面照片。 * 3、可上传1张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 * 4、请上传彩色照片or彩色扫描件or复印件(需加盖公章鲜章),可添加“微信支付”相关水印(如微信支付认证)。 * 示例值:jTpGmxUXqRTvDujqhThn4ReFxikqJ5YW6zFQ */ @SerializedName("contact_id_doc_copy") private String contactIdDocCopy; /** * 超级管理员证件反面照片 * 1、当超级管理员类型是经办人时,请上传超级管理员证件的反面照片。 * 2、若证件类型为护照,无需上传反面照片。 * 3、可上传1张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 * 4、请上传彩色照片or彩色扫描件or复印件(需加盖公章鲜章),可添加“微信支付”相关水印(如微信支付认证)。 * 示例值:jTpGmxUX3FBWVQ5NJTZvvDujqhThn4ReFxikqJ5YW6zFQ */ @SerializedName("contact_id_doc_copy_back") private String contactIdDocCopyBack; /** * 超级管理员证件有效期开始时间 * 1、当超级管理员类型是经办人时,请上传证件有效期开始时间。 * 2、请按照示例值填写。 * 3、结束时间大于开始时间。 * 示例值:2019-06-06 */ @SerializedName("contact_period_begin") private String contactPeriodBegin; /** * 超级管理员证件有效期结束时间 * 1、当超级管理员类型是经办人时,请上传证件有效期结束时间。 * 2、请按照示例值填写,若证件有效期为长期,请填写:长期。 * 3、结束时间大于开始时间。 * 示例值:2026-06-06 */ @SerializedName("contact_period_end") private String contactPeriodEnd; /** * 业务办理授权函 * 1、当超级管理员类型是经办人时,请上传业务办理授权函。 * 2、请参照[示例图]打印业务办理授权函,全部信息需打印,不支持手写商户信息,并加盖公章。 * 3、可上传1张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 * 示例值:47ZC6GC-vnrbEny_Ie_An5-tCpqxucuxi-vByf3Gjm7KEIUv0OF4wFNIO4kqg05InE4d2I6_H7I4 */ @SerializedName("business_authorization_letter") private String businessAuthorizationLetter; /** * 超级管理员微信openid * 1、“超级管理员身份证件号码”与“超级管理员微信openid”,二选一必填。 * 2、超级管理员签约时,校验微信号是否与该微信openid一致。 */ @SerializedName("openid") private String openid; /** * 1、11位数字。 * 2、用于接收微信支付的重要管理信息及日常操作验证码。 */ @SerializedName("mobile_phone") @SpecEncrypt private String mobilePhone; /** * 1、用于接收微信支付的开户邮件及日常业务通知。 * 2、需要带@,遵循邮箱格式校验,该字段需进行加密处理, */ @SerializedName("contact_email") @SpecEncrypt private String contactEmail; } /** * 主体资料 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class SubjectInfo implements Serializable { private static final long serialVersionUID = -6651911735969445765L; /** * 主体类型 */ @SerializedName("subject_type") private SubjectTypeEnum subjectType; /** * 是否是金融机构 */ @SerializedName("finance_institution") private Boolean financeInstitution; /** * 营业执照 */ @SerializedName("business_license_info") private BusinessLicenseInfo businessLicenseInfo; /** * 登记证书 */ @SerializedName("certificate_info") private CertificateInfo certificateInfo; /** * 单位证明函照片 */ @SerializedName("certificate_letter_copy") private String certificateLetterCopy; /** * 小微辅助证明材料 * 主体类型为小微商户时,小微辅助证明材料必填 */ @SerializedName("micro_biz_info") private MicroBizInfo microBizInfo; /** * 金融机构许可证信息 */ @SerializedName("finance_institution_info") private FinanceInstitutionInfo financeInstitutionInfo; /** * 经营者/法人身份证件 */ @SerializedName("identity_info") @SpecEncrypt private IdentityInfo identityInfo; /** * 最终受益人信息列表(UBO) */ @SerializedName("ubo_info_list") @SpecEncrypt private List<UboInfo> uboInfoList; @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class BusinessLicenseInfo implements Serializable { private static final long serialVersionUID = -1016615300418945838L; /** * 营业执照照片 */ @SerializedName("license_copy") private String licenseCopy; /** * 注册号/统一社会信用代码 */ @SerializedName("license_number") private String licenseNumber; /** * 商户名称 */ @SerializedName("merchant_name") private String merchantName; /** * 个体户经营者/法人姓名 */ @SerializedName("legal_person") private String legalPerson; /** * 注册地址 */ @SerializedName("license_address") private String licenseAddress; /** * 有效期限开始日期 */ @SerializedName("period_begin") private String periodBegin; /** * 有效期限结束日期 */ @SerializedName("period_end") private String periodEnd; } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class CertificateInfo implements Serializable { private static final long serialVersionUID = 5080675335337916895L; /** * 登记证书照片 */ @SerializedName("cert_copy") private String certCopy; /** * 登记证书类型 */ @SerializedName("cert_type") private CertTypeEnum certType; /** * 证书号 */ @SerializedName("cert_number") private String certNumber; /** * 商户名称 */ @SerializedName("merchant_name") private String merchantName; /** * 注册地址 */ @SerializedName("company_address") private String companyAddress; /** * 法定代表人 */ @SerializedName("legal_person") private String legalPerson; /** * 有效期限开始日期 */ @SerializedName("period_begin") private String periodBegin; /** * 有效期限结束日期 */ @SerializedName("period_end") private String periodEnd; } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class FinanceInstitutionInfo implements Serializable { private static final long serialVersionUID = 6016563999835704297L; /** * 金融机构类型 * * @see FinanceTypeEnum */ @SerializedName("finance_type") private FinanceTypeEnum financeType; /** * 金融机构许可证图片 */ @SerializedName("finance_license_pics") private List<String> financeLicensePics; } /** * 小微辅助证明材料 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class MicroBizInfo implements Serializable { private static final long serialVersionUID = 2327302539406612422L; /** * 小微经营类型 * 枚举值: * MICRO_TYPE_STORE:门店场所 * MICRO_TYPE_MOBILE:流动经营/便民服务 * MICRO_TYPE_ONLINE:线上商品/服务交易 * 示例值:MICRO_TYPE_STORE */ @SerializedName("micro_biz_type") private MicroBizTypeEnum microBizType; /** * 【门店场所】 经营类型为“门店场所”时填写 */ @SerializedName("micro_store_info") private MicroStoreInfo microStoreInfo; /** * 【流动经营/便民服务】 经营类型为“流动经营/便民服务”时填写 */ @SerializedName("micro_mobile_info") private MicroMobileInfo microMobileInfo; /** * 【线上商品/服务交易】 经营场景为“线上商品/服务交易”时填写 */ @SerializedName("micro_online_info") private MicroOnlineInfo microOnlineInfo; @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class MicroOnlineInfo implements Serializable { private static final long serialVersionUID = -4672635122639034459L; /** * 【线上店铺名称】 填写商家的线上店铺名称 * 1、长度为1-50个字符; * 2、前后不能有空格、制表符、换行符; * 3、不能仅含数字、特殊字符; * 4、仅能填写数字、英文字母、汉字及特殊字符; * 5、仅支持utf-8格式。 */ @SerializedName("micro_online_store") private String microOnlineStore; /** * 【电商平台名称】 填写电商平台名称 * 1、长度为1-50个字符; * 2、前后不能有空格、制表符、换行符; * 3、不能仅含数字、特殊字符; * 4、仅能填写数字、英文字母、汉字及特殊字符; * 5、仅支持utf-8格式。 */ @SerializedName("micro_ec_name") private String microEcName; /** * 【店铺二维码】 * 1、店铺二维码或店铺链接二选一必填; * 2、若为电商小程序,可上传店铺页面的小程序二维码; * 3、可上传1张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 */ @SerializedName("micro_qrcode") private String microQrcode; /** * 【店铺链接】 * 1、店铺二维码或店铺链接二选一必填; * 2、请填写店铺主页链接,需符合网站规范。 */ @SerializedName("micro_link") private String microLink; } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class MicroMobileInfo implements Serializable { private static final long serialVersionUID = -4672635122639034460L; /** * 【经营/服务名称】 请填写经营/服务名称 * 1、长度为1-50个字符; * 2、前后不能有空格、制表符、换行符; * 3、不能仅含数字、特殊字符; * 4、仅能填写数字、英文字母、汉字及特殊字符; * 5、仅支持utf-8格式。 */ @SerializedName("micro_mobile_name") private String microMobileName; /** * 【经营/服务所在地省市】 请填写经营/服务所在地省市编码 */ @SerializedName("micro_mobile_city") private String microMobileCity; /** * 【经营/服务所在地(不含省市)】 填写“无" */ @SerializedName("micro_mobile_address") private String microMobileAddress; /** * 【经营/服务现场照片】 * 1、提交流动经营现场照片,如摊位场景应提交摊位全景照片+商品照片。 * 2、可上传多张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 */ @SerializedName("micro_mobile_pics") private List<String> microMobilePics; } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class MicroStoreInfo implements Serializable { private static final long serialVersionUID = -4672635122639034461L; /** * 【门店名称】 * 请填写门店名称 * 1、长度为1-50个字符; * 2、前后不能有空格、制表符、换行符; * 3、不能仅含数字、特殊字符; * 4、仅能填写数字、英文字母、汉字及特殊字符; * 5、仅支持utf-8格式。 */ @SerializedName("micro_name") private String microName; /** * 【门店省市编码】 * 填写门店省市编码,只能由数字组成,详细参见微信支付提供的省市对照表 */ @SerializedName("micro_address_code") private String microAddressCode; /** * 【门店地址】 * 请填写详细的经营场所信息,如有多个场所,选择一个主要场所填写即可。 * 1、长度为4-512个字符; * 2、前后不能有空格、制表符、换行符; * 3、不能仅含数字、特殊字符; * 4、仅能填写数字、英文字母、汉字及特殊字符; * 5、仅支持utf-8格式。 */ @SerializedName("micro_address") private String microAddress; /** * 【门店门头照片】 * 1、请上传门头正面照片(要求门店招牌、门框完整、清晰、可辨识);若为停车场等无固定门头照片的经营场所,可上传岗亭/出入闸口。 * 2、可上传1张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 */ @SerializedName("store_entrance_pic") private String storeEntrancePic; /** * 【店内环境照片】 * 1、请上传门店内部环境照片(可辨识经营内容)。若为停车场等无固定门头的经营场所,可上传停车场内部照片。 * 2、可上传1张图片,请填写通过图片上传API预先上传图片生成好的MediaID。 */ @SerializedName("micro_indoor_copy") private String microIndoorCopy; /** * 【门店经度】 数字或小数,商户自定义字段 */ @SerializedName("store_longitude") private String storeLongitude; /** * 【门店纬度】 纬度,商户自定义字段 */ @SerializedName("store_latitude") private String storeLatitude; } } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class IdentityInfo implements Serializable { private static final long serialVersionUID = 1683704338370383827L; /** * 证件持有人类型 * LEGAL:法人 * SUPER:经办人 * 示例值:LEGAL * @see com.github.binarywang.wxpay.bean.ecommerce.ApplymentsRequest 字段idHolderType */ @SerializedName("id_holder_type") private String idHolderType; /** * 证件类型 */ @SerializedName("id_doc_type") private IdTypeEnum idDocType; /** * 法定代表人说明函 */ @SerializedName("authorize_letter_copy") private String authorizeLetterCopy; /** * 身份证信息 */ @SerializedName("id_card_info") @SpecEncrypt private IdCardInfo idCardInfo; /** * 其他类型证件信息 */ @SerializedName("id_doc_info") @SpecEncrypt private IdDocInfo idDocInfo; /** * 经营者/法人是否为受益人 */ @SerializedName("owner") private Boolean owner; @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class IdCardInfo implements Serializable { private static final long serialVersionUID = -2897792705297641786L; /** * 身份证人像面照片 */ @SerializedName("id_card_copy") private String idCardCopy; /** * 身份证国徽面照片 */ @SerializedName("id_card_national") private String idCardNational; /** * 身份证姓名 */ @SerializedName("id_card_name") @SpecEncrypt private String idCardName; /** * 身份证号码 */ @SerializedName("id_card_number") @SpecEncrypt private String idCardNumber; /** * 身份证居住地址 */ @SerializedName("id_card_address") @SpecEncrypt private String idCardAddress; /** * 身份证有效期开始时间 */ @SerializedName("card_period_begin") private String cardPeriodBegin; /** * 身份证有效期结束时间 */ @SerializedName("card_period_end") private String cardPeriodEnd; } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class IdDocInfo implements Serializable { private static final long serialVersionUID = 7335589815924447719L; /** * 证件正面照片 */ @SerializedName("id_doc_copy") private String idDocCopy; /** * 证件反面照片 */ @SerializedName("id_doc_copy_back") private String idDocCopyBack; /** * 证件姓名 */ @SerializedName("id_doc_name") @SpecEncrypt private String idDocName; /** * 证件号码 */ @SerializedName("id_doc_number") @SpecEncrypt private String idDocNumber; /** * 证件居住地址 */ @SerializedName("id_doc_address") @SpecEncrypt private String idDocAddress; /** * 证件有效期开始时间 */ @SerializedName("doc_period_begin") private String docPeriodBegin; /** * 证件有效期结束时间 */ @SerializedName("doc_period_end") private String docPeriodEnd; } } @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class UboInfo implements Serializable { private static final long serialVersionUID = 7918585690831975042L; /** * 证件类型 */ @SerializedName("ubo_id_doc_type") private IdTypeEnum uboIdDocType; /** * 证件正面照片 */ @SerializedName("ubo_id_doc_copy") private String uboIdDocCopy; /** * 证件反面照片 */ @SerializedName("ubo_id_doc_copy_back") private String uboIdDocCopyBack; /** * 证件姓名 */ @SerializedName("ubo_id_doc_name") @SpecEncrypt private String uboIdDocName; /** * 证件号码 */ @SerializedName("ubo_id_doc_number") @SpecEncrypt private String uboIdDocNumber; /** * 证件居住地址 */ @SerializedName("ubo_id_doc_address") @SpecEncrypt private String uboIdDocAddress; /** * 证件有效期开始时间 */ @SerializedName("ubo_period_begin") private String uboPeriodBegin; /** * 证件有效期结束时间 */ @SerializedName("ubo_period_end") private String uboPeriodEnd; } } /** * 经营资料 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class BusinessInfo implements Serializable { private static final long serialVersionUID = -8605049544105644011L; /** * 商户简称 */ @SerializedName("merchant_shortname") private String merchantShortname; /** * 客服电话 */ @SerializedName("service_phone") private String servicePhone; /** * 经营场景 */ @SerializedName("sales_info") private SalesInfo salesInfo; @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class SalesInfo implements Serializable { private static final long serialVersionUID = 6428044729204137659L; /** * 经营场景类型 */ @SerializedName("sales_scenes_type") private List<SalesScenesTypeEnum> salesScenesType; /** * 线下门店场景 */ @SerializedName("biz_store_info") private BizStoreInfo bizStoreInfo; /** * 公众号场景 */ @SerializedName("mp_info") private MpInfo mpInfo; /** * 小程序场景 */ @SerializedName("mini_program_info") private MiniProgramInfo miniProgramInfo; /** * APP场景 */ @SerializedName("app_info") private AppInfo appInfo; /** * 互联网网站场景 */ @SerializedName("web_info") private WebInfo webInfo; /** * 企业微信场景 */ @SerializedName("wework_info") private WeworkInfo weworkInfo; /** * 线下门店场景 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class BizStoreInfo implements Serializable { private static final long serialVersionUID = 4397253725912709093L; /** * 门店名称 */ @SerializedName("biz_store_name") private String bizStoreName; /** * 门店省市编码 */ @SerializedName("biz_address_code") private String bizAddressCode; /** * 门店地址 */ @SerializedName("biz_store_address") private String bizStoreAddress; /** * 门店门头照片 */ @SerializedName("store_entrance_pic") private List<String> storeEntrancePic; /** * 店内环境照片 */ @SerializedName("indoor_pic") private List<String> indoorPic; /** * 线下场所对应的商家APPID */ @SerializedName("biz_sub_appid") private String bizSubAppid; } /** * 公众号场景 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class MpInfo implements Serializable { private static final long serialVersionUID = 167582552189873597L; /** * 服务商公众号APPID */ @SerializedName("mp_appid") private String mpAppid; /** * 商家公众号APPID */ @SerializedName("mp_sub_appid") private String mpSubAppid; /** * 公众号页面截图 */ @SerializedName("mp_pics") private List<String> mpPics; } /** * 小程序场景 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class MiniProgramInfo implements Serializable { private static final long serialVersionUID = -371749335686796436L; /** * 服务商小程序APPID */ @SerializedName("mini_program_appid") private String miniProgramAppid; /** * 商家小程序APPID */ @SerializedName("mini_program_sub_appid") private String miniProgramSubAppid; /** * 小程序截图 */ @SerializedName("mini_program_pics") private List<String> miniProgramPics; } /** * APP场景 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class AppInfo implements Serializable { private static final long serialVersionUID = 3959643687528770473L; /** * 服务商应用APPID */ @SerializedName("app_appid") private String appAppid; /** * 商家应用APPID */ @SerializedName("app_sub_appid") private String appSubAppid; /** * APP截图 */ @SerializedName("app_pics") private List<String> appPics; } /** * 互联网网站场景 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class WebInfo implements Serializable { private static final long serialVersionUID = -4183874827185822310L; /** * 互联网网站域名 */ @SerializedName("domain") private String domain; /** * 网站授权函 */ @SerializedName("web_authorisation") private String webAuthorisation; /** * 互联网网站对应的商家APPID */ @SerializedName("web_appid") private String webAppid; } /** * 企业微信场景 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class WeworkInfo implements Serializable { private static final long serialVersionUID = 9075531305717309383L; /** * 商家企业微信CorpID */ @SerializedName("sub_corp_id") private String subCorpId; /** * 企业微信页面截图 */ @SerializedName("wework_pics") private List<String> weworkPics; } } } /** * 结算规则 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class SettlementInfo implements Serializable { private static final long serialVersionUID = -5025743467243760522L; /** * 入驻结算规则ID */ @SerializedName("settlement_id") private String settlementId; /** * 所属行业 */ @SerializedName("qualification_type") private String qualificationType; /** * 特殊资质图片 */ @SerializedName("qualifications") private List<String> qualifications; /** * 优惠费率活动ID */ @SerializedName("activities_id") private String activitiesId; /** * 优惠费率活动值 */ @SerializedName("activities_rate") private String activitiesRate; /** * 非信用卡活动费率值 */ @SerializedName("debit_activities_rate") private String debitActivitiesRate; /** * 信用卡活动费率值 */ @SerializedName("credit_activities_rate") private String creditActivitiesRate; /** * 优惠费率活动补充材料 */ @SerializedName("activities_additions") private List<String> activitiesAdditions; } /** * 结算银行账户 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class BankAccountInfo implements Serializable { private static final long serialVersionUID = -5853122395888860086L; /** * 账户类型 */ @SerializedName("bank_account_type") private BankAccountTypeEnum bankAccountType; /** * 开户名称 */ @SerializedName("account_name") @SpecEncrypt private String accountName; /** * 开户银行 */ @SerializedName("account_bank") private String accountBank; /** * 开户银行省市编码 */ @SerializedName("bank_address_code") private String bankAddressCode; /** * 开户银行联行号 */ @SerializedName("bank_branch_id") private String bankBranchId; /** * 开户银行全称(含支行] */ @SerializedName("bank_name") private String bankName; /** * 银行账号 */ @SerializedName("account_number") @SpecEncrypt private String accountNumber; } /** * 补充材料 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public static class AdditionInfo implements Serializable { private static final long serialVersionUID = -7526912529114022379L; /**
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
true
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/ModifySettlementRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/ModifySettlementRequest.java
package com.github.binarywang.wxpay.bean.applyment; import com.github.binarywang.wxpay.bean.applyment.enums.AccountTypeEnum; import com.github.binarywang.wxpay.v3.SpecEncrypt; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * 修改结算账户请求对象 */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class ModifySettlementRequest implements Serializable { private static final long serialVersionUID = 4568552340365230872L; /** * 账户类型 */ @SerializedName("account_type") private AccountTypeEnum accountType; /** * 开户名称 */ @SpecEncrypt @SerializedName("account_name") private String accountName; /** * 开户银行 */ @SerializedName("account_bank") private String accountBank; /** * 开户银行省市编码 */ @SerializedName("bank_address_code") private String bankAddressCode; /** * 开户银行全称(含支行) */ @SerializedName("bank_name") private String bankName; /** * 开户银行联行号 */ @SerializedName("bank_branch_id") private String bankBranchId; /** * 银行账号 */ @SpecEncrypt @SerializedName("account_number") private String accountNumber; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/SettlementInfoResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/SettlementInfoResult.java
package com.github.binarywang.wxpay.bean.applyment; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * 查询结算账户返回对象信息 * * @see <a href="https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter11_1_4.shtml">查询结算账户</a> */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class SettlementInfoResult implements Serializable { private static final long serialVersionUID = 4568552340365230872L; /** * 账户类型 */ @SerializedName("account_type") private String accountType; /** * 开户银行 */ @SerializedName("account_bank") private String accountBank; /** * 开户银行全称(含支行] */ @SerializedName("bank_name") private String bankName; /** * 开户银行联行号 */ @SerializedName("bank_branch_id") private String bankBranchId; /** * 银行账号 */ @SerializedName("account_number") private String accountNumber; /** * 汇款验证结果 * * @see com.github.binarywang.wxpay.bean.applyment.enums.SettlementVerifyResultEnum */ @SerializedName("verify_result") private String verifyResult; /** * 汇款验证失败原因 * * @since 4.4.0 * @date 2022.12.09 */ @SerializedName("verify_fail_reason") private String verifyFailReason; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/WxPayApplymentCreateResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/WxPayApplymentCreateResult.java
package com.github.binarywang.wxpay.bean.applyment; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import java.io.Serializable; /** * 特约商户进件 提交申请结果响应 * * @author zhouyongshen */ @Data @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) public class WxPayApplymentCreateResult implements Serializable { private static final long serialVersionUID = 1L; /** * 微信支付申请单号 */ @SerializedName("applyment_id") private String applymentId; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/IdTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/IdTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 个体户/企业/党政、机关及事业单位/其他组织:可选择任一证件类型。 * 枚举值 * * @author 叶枫 */ public enum IdTypeEnum { /** * 中国大陆居民-身份证 */ IDENTIFICATION_TYPE_IDCARD, /** * 其他国家或地区居民-护照 */ IDENTIFICATION_TYPE_OVERSEA_PASSPORT, /** * 中国香港居民-来往内地通行证 */ IDENTIFICATION_TYPE_HONGKONG_PASSPORT, /** * 中国澳门居民-来往内地通行证 */ IDENTIFICATION_TYPE_MACAO_PASSPORT, /** * 中国台湾居民-来往大陆通行证 */ IDENTIFICATION_TYPE_TAIWAN_PASSPORT, /** * 外国人居留证 */ IDENTIFICATION_TYPE_FOREIGN_RESIDENT, /** * 港澳居民证 */ IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT, /** * 台湾居民证 */ IDENTIFICATION_TYPE_TAIWAN_RESIDENT, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SalesScenesTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SalesScenesTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 经营场景类型枚举值 */ public enum SalesScenesTypeEnum { /** * 线下门店 */ SALES_SCENES_STORE, /** * 公众号 */ SALES_SCENES_MP, /** * 小程序 */ SALES_SCENES_MINI_PROGRAM, /** * 互联网 */ SALES_SCENES_WEB, /** * APP */ SALES_SCENES_APP, /** * 企业微信 */ SALES_SCENES_WEWORK, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/ApplymentStateEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/ApplymentStateEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 申请单状态枚举类 * * @author zhouyongshen */ public enum ApplymentStateEnum { /** * (编辑中):提交申请发生错误导致,请尝试重新提交。 */ APPLYMENT_STATE_EDITTING, /** * (审核中):申请单正在审核中,超级管理员用微信打开“签约链接”,完成绑定微信号后,申请单进度将通过微信公众号通知超级管理员,引导完成后续步骤。 */ APPLYMENT_STATE_AUDITING, /** * (已驳回):请按照驳回原因修改申请资料,超级管理员用微信打开“签约链接”,完成绑定微信号,后续申请单进度将通过微信公众号通知超级管理员。 */ APPLYMENT_STATE_REJECTED, /** * (待账户验证):请超级管理员使用微信打开返回的“签约链接”,根据页面指引完成账户验证。 */ APPLYMENT_STATE_TO_BE_CONFIRMED, /** * (待签约):请超级管理员使用微信打开返回的“签约链接”,根据页面指引完成签约。 */ APPLYMENT_STATE_TO_BE_SIGNED, /** * (开通权限中):系统开通相关权限中,请耐心等待。 */ APPLYMENT_STATE_SIGNING, /** * (已完成):商户入驻申请已完成。 */ APPLYMENT_STATE_FINISHED, /** * (已作废):申请单已被撤销。 */ APPLYMENT_STATE_CANCELED }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/FinanceTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/FinanceTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 金融机构类型 **/ public enum FinanceTypeEnum { /** * 银行业, 适用于商业银行、政策性银行、农村合作银行、村镇银行、开发性金融机构等 */ BANK_AGENT, /** * 支付机构, 适用于非银行类支付机构 */ PAYMENT_AGENT, /** * 保险业, 适用于保险、保险中介、保险代理、保险经纪等保险类业务 */ INSURANCE, /** * 交易及结算类金融机构, 适用于交易所、登记结算类机构、银行卡清算机构、资金清算中心等 */ TRADE_AND_SETTLE, /** * 其他金融机构, 适用于财务公司、信托公司、金融资产管理公司、金融租赁公司、汽车金融公司、贷款公司、货币经纪公司、消费金融公司、证券业、金融控股公司、股票、期货、货币兑换、小额贷款公司、金融资产管理、担保公司、商业保理公司、典当行、融资租赁公司、财经咨询等其他金融业务 */ OTHER, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/AccountTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/AccountTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 银行结算账户枚举类 */ public enum AccountTypeEnum { /** * 对公银行账户 */ ACCOUNT_TYPE_BUSINESS, /** * 经营者个人银行卡 */ ACCOUNT_TYPE_PRIVATE, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/CertTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/CertTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 登记证书的类型枚举 */ public enum CertTypeEnum { /** * 事业单位法人证书 */ CERTIFICATE_TYPE_2388, /** * 统一社会信用代码证书 */ CERTIFICATE_TYPE_2389, /** * 有偿服务许可证(军队医院适用) */ CERTIFICATE_TYPE_2390, /** * 医疗机构执业许可证(军队医院适用) */ CERTIFICATE_TYPE_2391, /** * 企业营业执照(挂靠企业的党组织适用) */ CERTIFICATE_TYPE_2392, /** * 组织机构代码证(政府机关适用) */ CERTIFICATE_TYPE_2393, /** * 社会团体法人登记证书 */ CERTIFICATE_TYPE_2394, /** * 民办非企业单位登记证书 */ CERTIFICATE_TYPE_2395, /** * 基金会法人登记证书 */ CERTIFICATE_TYPE_2396, /** * 宗教活动场所登记证 */ CERTIFICATE_TYPE_2399, /** * 其他证书/批文/证明 */ CERTIFICATE_TYPE_2400, /** * 执业许可证/执业证 */ CERTIFICATE_TYPE_2520, /** * 基层群众性自治组织特别法人统一社会信用代码证 */ CERTIFICATE_TYPE_2521, /** * 农村集体经济组织登记证 */ CERTIFICATE_TYPE_2522, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SettlementVerifyStateEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SettlementVerifyStateEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 结算账户修改审核状态 **/ public enum SettlementVerifyStateEnum { /** * 审核成功 */ AUDIT_SUCCESS, /** * 审核中 */ AUDITING, /** * 审核驳回 */ AUDIT_FAIL, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SettlementVerifyResultEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SettlementVerifyResultEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 返回特约商户的结算账户-汇款验证结果枚举类 * * @author zhouyognshen */ public enum SettlementVerifyResultEnum { /** * 系统汇款验证中,商户可发起提现尝试。 */ VERIFYING, /** * 系统成功汇款,该账户可正常发起提现。 */ VERIFY_SUCCESS, /** * 系统汇款失败,该账户无法发起提现,请检查修改。 */ VERIFY_FAIL, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/BankAccountTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/BankAccountTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 银行结算账户枚举类 */ public enum BankAccountTypeEnum { /** * 对公银行账户 */ BANK_ACCOUNT_TYPE_CORPORATE, /** * 经营者个人银行卡 */ BANK_ACCOUNT_TYPE_PERSONAL, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SubjectTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/SubjectTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 主体类型枚举类 * <pre> * 商户申请接入时如何选择主体类型? https://kf.qq.com/faq/180910IBZVnQ180910naQ77b.html * </pre> * * @author zhouyongshen * @author 狂龙骄子 * @since 2023.01.14 新增{@link #SUBJECT_TYPE_GOVERNMENT} * @since 2023.09.19 移除SUBJECT_TYPE_MICRO小微主体 * @since 2024.11.02 回退SUBJECT_TYPE_MICRO小微主体 * @see <a href="https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter11_1_1.shtml">服务商平台>>商户进件>>特约商户进件>>提交申请单>>请求参数>>主体资料>>主体类型</a> */ public enum SubjectTypeEnum { /** * (个体户):营业执照上的主体类型一般为个体户、个体工商户、个体经营; */ SUBJECT_TYPE_INDIVIDUAL, /** * (企业):营业执照上的主体类型一般为有限公司、有限责任公司; */ SUBJECT_TYPE_ENTERPRISE, /** * (事业单位):包括国内各类事业单位,如:医疗、教育、学校等单位; */ SUBJECT_TYPE_INSTITUTIONS, /** * (政府机关):包括各级、各类政府机关,如机关党委、税务、民政、人社、工商、商务、市监等; */ SUBJECT_TYPE_GOVERNMENT, /** * (社会组织):包括社会团体、民办非企业、基金会、基层群众性自治组织、农村集体经济组织等组织。 */ SUBJECT_TYPE_OTHERS, /** * Tips: 特约商户进件不支持小微,但开户意愿提交支持,公用的一个枚举 * (小微):无营业执照、免办理工商注册登记的实体商户 */ SUBJECT_TYPE_MICRO; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/MicroBizTypeEnum.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/applyment/enums/MicroBizTypeEnum.java
package com.github.binarywang.wxpay.bean.applyment.enums; /** * 小微经营类型 */ public enum MicroBizTypeEnum { /** * 门店场所 */ MICRO_TYPE_STORE, /** * 流动经营/便民服务 */ MICRO_TYPE_MOBILE, /** * 线上商品/服务交易 */ MICRO_TYPE_ONLINE, ; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankQueryResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * <pre> * 企业付款到银行卡查询返回结果. * Created by Binary Wang on 2017/12/21. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayBankQueryResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = -8336631015989500746L; /** * 商户企业付款单号 */ @XStreamAlias("partner_trade_no") private String partnerTradeNo; /** * 微信企业付款单号. * 即为微信内部业务单号 */ @XStreamAlias("payment_no") private String paymentNo; /** * 银行卡号. * 收款用户银行卡号(MD5加密) */ @XStreamAlias("bank_no_md5") private String bankNoMd5; /** * 用户真实姓名. * 收款人真实姓名(MD5加密) */ @XStreamAlias("true_name_md5") private String trueNameMd5; /** * 付款金额. */ @XStreamAlias("amount") private Integer amount; /** * 代付单状态. * <pre> * PROCESSING(处理中,如有明确失败,则返回额外失败原因;否则没有错误原因) * SUCCESS(付款成功) * FAILED(付款失败) * BANK_FAIL(银行退票,订单状态由付款成功流转至退票,退票时付款金额和手续费会自动退还) * </pre> */ @XStreamAlias("status") private String status; /** * 手续费金额 */ @XStreamAlias("cmms_amt") private Integer cmmsAmount; /** * 商户下单时间. * 微信侧订单创建时间 */ @XStreamAlias("create_time") private String createTime; /** * 成功付款时间. * 微信侧付款成功时间(但无法保证银行不会退票) */ @XStreamAlias("pay_succ_time") private String paySuccessTime; /** * 失败原因. * 订单失败原因(如:余额不足) */ @XStreamAlias("reason") private String failReason; @Override protected void loadXml(Document d) { partnerTradeNo = readXmlString(d, "partner_trade_no"); paymentNo = readXmlString(d, "payment_no"); bankNoMd5 = readXmlString(d, "bank_no_md5"); trueNameMd5 = readXmlString(d, "true_name_md5"); amount = readXmlInteger(d, "amount"); status = readXmlString(d, "status"); cmmsAmount = readXmlInteger(d, "cmms_amt"); createTime = readXmlString(d, "create_time"); paySuccessTime = readXmlString(d, "pay_succ_time"); failReason = readXmlString(d, "reason"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * <pre> * 企业付款到银行卡的响应结果. * Created by Binary Wang on 2017/12/21. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayBankResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 3449707749935227689L; /** * 代付金额. */ @XStreamAlias("amount") private Integer amount; /** * 商户企业付款单号. */ @XStreamAlias("partner_trade_no") private String partnerTradeNo; //############以下字段在return_code 和result_code都为SUCCESS的时候有返回############## /** * 微信企业付款单号. * 代付成功后,返回的内部业务单号 */ @XStreamAlias("payment_no") private String paymentNo; /** * 手续费金额. * RMB:分 */ @XStreamAlias("cmms_amt") private Integer cmmsAmount; @Override protected void loadXml(Document d) { amount = readXmlInteger(d, "amount"); partnerTradeNo = readXmlString(d, "partner_trade_no"); paymentNo = readXmlString(d, "payment_no"); cmmsAmount = readXmlInteger(d, "cmms_amt"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankRequest.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * <pre> * 企业付款到银行卡的请求对象类 * Created by BinaryWang on 2017/12/20. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @AllArgsConstructor @Builder @XStreamAlias("xml") public class EntPayBankRequest extends BaseWxPayRequest { /** * <pre> * 商户企业付款单号. * 变量名:partner_trade_no * 是否必填:是 * 示例值:1212121221227 * 类型:string(32) * 描述:商户订单号,需保持唯一(只允许数字[0~9]或字母[A~Z]和[a~z],最短8位,最长32位) * </pre> */ @Required @XStreamAlias("partner_trade_no") private String partnerTradeNo; /** * <pre> * 收款方银行卡号. * 传值时请传原始值 * 变量名:enc_bank_no * 是否必填:是 * 示例值:8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f * 类型:string(64) * 描述:收款方银行卡号(采用标准RSA算法,公钥由微信侧提供),详见获取RSA加密公钥API * </pre> */ @Required @XStreamAlias("enc_bank_no") private String encBankNo; /** * <pre> * 收款方用户名. * 传值时请传原始值 * 变量名:enc_true_name * 是否必填:是 * 示例值:ca775af5f841bdf424b2e6eb86a6e21e * 类型:string(64) * 描述:收款方用户名(采用标准RSA算法,公钥由微信侧提供)详见获取RSA加密公钥API * </pre> */ @Required @XStreamAlias("enc_true_name") private String encTrueName; /** * <pre> * 收款方开户行. * 变量名:bank_code * 是否必填:是 * 示例值:1001 * 类型:string(64) * 描述:银行卡所在开户行编号,详见银行编号列表 * </pre> */ @Required @XStreamAlias("bank_code") private String bankCode; /** * <pre> * 付款金额. * 变量名:amount * 是否必填:是 * 示例值:100000 * 类型:int * 描述:付款金额:RMB分(支付总额,不含手续费) 注:大于0的整数 * </pre> */ @Required @XStreamAlias("amount") private Integer amount; /** * <pre> * 付款说明. * 变量名:desc * 是否必填:否 * 示例值:理财 * 类型:string * 描述:企业付款到银行卡付款说明,即订单备注(UTF8编码,允许100个字符以内) * </pre> */ @XStreamAlias("desc") private String description; @Override protected void checkConstraints() throws WxPayException { } @Override protected String[] getIgnoredParamsForSign() { return new String[]{"sign_type"}; } @Override protected void storeMap(Map<String, String> map) { map.put("partner_trade_no", partnerTradeNo); map.put("enc_bank_no", encBankNo); map.put("enc_true_name", encTrueName); map.put("bank_code", bankCode); map.put("amount", amount.toString()); map.put("desc", description); } @Override protected boolean ignoreAppid() { return true; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackQueryResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * 红包发送记录查询返回 * * @author wuyong * created on 2019-12-01 17:23 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayRedpackQueryResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 3127509905347445197L; /** * 商户订单号 * 商户使用查询API填写的商户单号的原路返回 */ @XStreamAlias("mch_billno") protected String mchBillNo; /** * 红包单号 * 使用API发放现金红包时返回的红包单号 */ @XStreamAlias("detailId") private String detailId; /** * 红包状态 * SENDING:发放 * SENT: * 已发放待领取 * FAILED:发放失败 * RECEIVED:已领取 * RFUND_ING:退款中 REFUND:已退款 */ @XStreamAlias("status") private String status; /** * 发放类型 * API:通过API接口发放 */ @XStreamAlias("send_type") private String sendType; /** * 红包金额 * 红包总金额(单位分) */ @XStreamAlias("total_amount") private Integer totalAmount; /** * 失败原因 * 发送失败原因 */ @XStreamAlias("reason") private String reason; /** * 红包发送时间 */ @XStreamAlias("send_time") private String sendTime; /** * 红包的退款时间 */ @XStreamAlias("refund_time") private String refundTime; /** * 红包退款金额 */ @XStreamAlias("refund_amount") private Integer refundAmount; /** * 祝福语 */ @XStreamAlias("wishing") private String wishing; /** * 备注 */ @XStreamAlias("remark") private String remark; /** * 活动名称 */ @XStreamAlias("act_name") private String actName; /** * 领取红包的Openid */ @XStreamAlias("openid") private String openid; /** * 金额 */ @XStreamAlias("amount") private Integer amount; /** * 接收时间 */ @XStreamAlias("rcv_time") private String rcvTime; /** * 发送者名称 */ @XStreamAlias("sender_name") private String senderName; /** * 发送者头像 * 通过企业微信开放接口上传获取 */ @XStreamAlias("sender_header_media_id") private String senderHeaderMediaId; @Override protected void loadXml(Document d) { mchBillNo = readXmlString(d, "mch_billno"); detailId = readXmlString(d, "detailId"); status = readXmlString(d, "status"); sendType = readXmlString(d, "send_type"); totalAmount = readXmlInteger(d, "total_amount"); reason = readXmlString(d, "reason"); sendTime = readXmlString(d, "send_time"); refundTime = readXmlString(d, "refund_time"); refundAmount = readXmlInteger(d, "refund_amount"); wishing = readXmlString(d, "wishing"); remark = readXmlString(d, "remark"); actName = readXmlString(d, "act_name"); openid = readXmlString(d, "openid"); amount = readXmlInteger(d, "amount"); rcvTime = readXmlString(d, "rcv_time"); senderName = readXmlString(d, "sender_name"); senderHeaderMediaId = readXmlString(d, "sender_header_media_id"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayQueryResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * <pre> * 企业付款查询返回结果. * Created by Binary Wang on 2016/10/19. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayQueryResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 3948485732447456947L; /** * 商户订单号. */ @XStreamAlias("partner_trade_no") private String partnerTradeNo; /** * 付款单号. */ @XStreamAlias("detail_id") private String detailId; /** * 转账状态. */ @XStreamAlias("status") private String status; /** * 失败原因. */ @XStreamAlias("reason") private String reason; /** * 收款用户openid. */ @XStreamAlias("openid") private String openid; /** * 收款用户姓名. */ @XStreamAlias("transfer_name") private String transferName; /** * 付款金额. */ @XStreamAlias("payment_amount") private Integer paymentAmount; /** * 发起转账的时间. */ @XStreamAlias("transfer_time") private String transferTime; /** * 企业付款成功时间. */ @XStreamAlias("payment_time") private String paymentTime; /** * 付款描述. */ @XStreamAlias("desc") private String desc; @Override protected void loadXml(Document d) { partnerTradeNo = readXmlString(d, "partner_trade_no"); detailId = readXmlString(d, "detail_id"); status = readXmlString(d, "status"); reason = readXmlString(d, "reason"); openid = readXmlString(d, "openid"); transferName = readXmlString(d, "transfer_name"); paymentAmount = readXmlInteger(d, "payment_amount"); transferTime = readXmlString(d, "transfer_time"); paymentTime = readXmlString(d, "payment_time"); desc = readXmlString(d, "desc"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/GetPublicKeyResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/GetPublicKeyResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import org.w3c.dom.Document; import java.io.Serializable; /** * <pre> * 企业付款获取RSA加密公钥接口返回结果类 * Created by BinaryWang on 2017/12/20. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @XStreamAlias("xml") public class GetPublicKeyResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = -9150517427082709997L; /** * 商户号. */ @XStreamAlias("mch_id") private String mchId; /** * 密钥 */ @XStreamAlias("pub_key") private String pubKey; @Override protected void loadXml(Document d) { mchId = readXmlString(d, "mch_id"); pubKey = readXmlString(d, "pub_key"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayBankQueryRequest.java
package com.github.binarywang.wxpay.bean.entpay; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; /** * <pre> * 企业付款到银行卡的请求对象 * Created by Binary Wang on 2017/12/21. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayBankQueryRequest extends EntPayQueryRequest { private static final long serialVersionUID = -479088843124447119L; @Override protected boolean ignoreAppid() { return true; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * <pre> * 企业付款返回结果 * Created by Binary Wang on 2016/10/02. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 8523569987269603097L; /** * 商户号. */ @XStreamAlias("mchid") private String mchId; /** * 商户appid. */ @XStreamAlias("mch_appid") private String mchAppid; /** * 设备号. */ @XStreamAlias("device_info") private String deviceInfo; //############以下字段在return_code 和result_code都为SUCCESS的时候有返回############## /** * 商户订单号. */ @XStreamAlias("partner_trade_no") private String partnerTradeNo; /** * 微信订单号. */ @XStreamAlias("payment_no") private String paymentNo; /** * 微信支付成功时间. */ @XStreamAlias("payment_time") private String paymentTime; /** * 企业付款失败时返回的状态码. */ @XStreamAlias("retcode") protected String retCode; /** * 企业付款失败时返回的信息. */ @XStreamAlias("retmsg") protected String retMsg; @Override protected void loadXml(Document d) { mchId = readXmlString(d, "mchid"); mchAppid = readXmlString(d, "mch_appid"); deviceInfo = readXmlString(d, "device_info"); partnerTradeNo = readXmlString(d, "partner_trade_no"); paymentNo = readXmlString(d, "payment_no"); paymentTime = readXmlString(d, "payment_time"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackQueryRequest.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import java.util.Map; /** * 红包发送记录查询请求 * * @author wuyong * created on 2019-12-01 17:19 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class EntPayRedpackQueryRequest extends BaseWxPayRequest { /** * 商户订单号 */ @XStreamAlias("mch_billno") private String mchBillNo; @Override protected void checkConstraints() throws WxPayException { } @Override protected void storeMap(Map<String, String> map) { map.put("mch_billno", mchBillNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackRequest.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * 发送企业红包 * * @author wuyong * created on 2019-12-1 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class EntPayRedpackRequest extends BaseWxPayRequest { private static final long serialVersionUID = 1L; @Override protected void checkConstraints() throws WxPayException { } /** * 商户订单号(每个订单号必须唯一) * 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。 * 必填:是 */ @Required @XStreamAlias("mch_billno") private String mchBillNo; /** * 微信分配的公众账号ID(企业微信corpid即为此appId) * 必填:是 */ @Required @XStreamAlias("wxappid") private String wxAppId; /** * 发送者名称 * 以个人名义发红包,红包发送者名称(需要utf-8格式)。与agentid互斥,二者只能填一个。 * 必填:否 */ @XStreamAlias("sender_name") private String senderName; /** * 发送红包的应用id * 以企业应用的名义发红包,企业应用id,整型,可在企业微信管理端应用的设置页面查看。与sender_name互斥,二者只能填一个。 * 必填:否 */ @XStreamAlias("agentid") private String agentId; /** * 发送者头像 * 发送者头像素材id,通过企业微信开放上传素材接口获取 * 必填:否 */ @XStreamAlias("sender_header_media_id") private String senderHeaderMediaId; /** * 用户openid * 接受红包的用户.用户在wxappid下的openid。 * 必填:是 */ @Required @XStreamAlias("re_openid") private String reOpenid; /** * 金额 * 单位分,单笔最小金额默认为1元 * 必填:是 */ @Required @XStreamAlias("total_amount") private Integer totalAmount; /** * 红包祝福语 * 必填:是 */ @Required @XStreamAlias("wishing") private String wishing; /** * 项目名称 * 必填:是 */ @Required @XStreamAlias("act_name") private String actName; /** * 备注 * 必填:是 */ @Required @XStreamAlias("remark") private String remark; /** * 场景 * 发放红包使用场景,红包金额大于200时必传 * PRODUCT_1:商品促销 * PRODUCT_2:抽奖 * PRODUCT_3:虚拟物品兑奖 * PRODUCT_4:企业内部福利 * PRODUCT_5:渠道分润 * PRODUCT_6:保险回馈 * PRODUCT_7:彩票派奖 * PRODUCT_8:税务刮奖 */ @XStreamAlias("scene_id") private String sceneId; @Override protected boolean ignoreAppid() { return true; } @Override protected boolean ignoreSubAppId() { return true; } @Override protected boolean ignoreSubMchId() { return true; } @Override protected boolean isWxWorkSign() { return true; } @Override protected String[] getIgnoredParamsForSign() { return new String[]{"sign_type"}; } @Override protected void storeMap(Map<String, String> map) { map.put("mch_billno", mchBillNo); map.put("wxappid", wxAppId); map.put("sender_name", senderName); map.put("agentid", agentId); map.put("sender_header_media_id", senderHeaderMediaId); map.put("re_openid", reOpenid); map.put("total_amount", totalAmount.toString()); map.put("wishing", wishing); map.put("act_name", actName); map.put("remark", remark); map.put("scene_id", sceneId); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayQueryRequest.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import me.chanjar.weixin.common.annotation.Required; import me.chanjar.weixin.common.util.json.WxGsonBuilder; import java.util.Map; /** * <pre> * 企业付款请求对象. * Created by Binary Wang on 2016/10/19. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class EntPayQueryRequest extends BaseWxPayRequest { private static final long serialVersionUID = 1972288742207813985L; /** * <pre> * 字段名:商户订单号. * 变量名:partner_trade_no * 是否必填:是 * 示例值:10000098201411111234567890 * 类型:String * 描述商户订单号 * </pre> */ @Required @XStreamAlias("partner_trade_no") private String partnerTradeNo; @Override protected void checkConstraints() { //do nothing } @Override public String toString() { return WxGsonBuilder.create().toJson(this); } @Override protected String[] getIgnoredParamsForSign() { return new String[]{"sign_type"}; } @Override protected void storeMap(Map<String, String> map) { map.put("partner_trade_no", partnerTradeNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRequest.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * <pre> * 企业付款请求对象. * Created by Binary Wang on 2016/10/02. * </pre> * * @author <a href="https://github.com/binarywang">Binary Wang</a> */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class EntPayRequest extends BaseWxPayRequest { private static final long serialVersionUID = 8647710192770447579L; /** * <pre> * 字段名:公众账号appid. * 变量名:mch_appid * 是否必填:是 * 示例值:wx8888888888888888 * 类型:String * 描述:微信分配的公众账号ID(企业号corpid即为此appId) * </pre> */ @XStreamAlias("mch_appid") private String mchAppid; /** * <pre> * 字段名:商户号. * 变量名:mchid * 是否必填:是 * 示例值:1900000109 * 类型:String(32) * 描述:微信支付分配的商户号 * </pre> */ @XStreamAlias("mchid") private String mchId; /** * <pre> * 字段名:设备号. * 变量名:device_info * 是否必填:否 * 示例值:13467007045764 * 类型:String(32) * 描述:微信支付分配的终端设备号 * </pre> */ @XStreamAlias("device_info") private String deviceInfo; /** * <pre> * 字段名:商户订单号. * 变量名:partner_trade_no * 是否必填:是 * 示例值:10000098201411111234567890 * 类型:String * 描述:商户订单号 * </pre> */ @Required @XStreamAlias("partner_trade_no") private String partnerTradeNo; /** * <pre> * 字段名:需保持唯一性 用户openid. * 变量名:openid * 是否必填:是 * 示例值:oxTWIuGaIt6gTKsQRLau2M0yL16E * 类型:String * 描述:商户appid下,某用户的openid * </pre> */ @Required @XStreamAlias("openid") private String openid; /** * <pre> * 字段名:校验用户姓名选项. * 变量名:check_name * 是否必填:是 * 示例值:OPTION_CHECK * 类型:String * 描述:NO_CHECK:不校验真实姓名  * FORCE_CHECK:强校验真实姓名(未实名认证的用户会校验失败,无法转账)  * OPTION_CHECK:针对已实名认证的用户才校验真实姓名(未实名认证用户不校验,可以转账成功) * </pre> */ @Required @XStreamAlias("check_name") private String checkName; /** * <pre> * 字段名:收款用户姓名. * 变量名:re_user_name * 是否必填:可选 * 示例值:马花花 * 类型:String * 描述:收款用户真实姓名。 * 如果check_name设置为FORCE_CHECK或OPTION_CHECK, 则必填用户真实姓名 * </pre> */ @XStreamAlias("re_user_name") private String reUserName; /** * <pre> * 字段名:金额. * 变量名:amount * 是否必填:是 * 示例值:10099 * 类型:int * 描述:企业付款金额, 单位为分 * </pre> */ @Required @XStreamAlias("amount") private Integer amount; /** * <pre> * 字段名:企业付款描述信息. * 变量名:desc * 是否必填:是 * 示例值:理赔 * 类型:String * 描述:企业付款操作说明信息。必填。 * </pre> */ @Required @XStreamAlias("desc") private String description; /** * <pre> * 字段名:Ip地址. * 变量名:spbill_create_ip * 是否必填:是 * 示例值:192.168.0.1 * 类型:String(32) * 描述:调用接口的机器Ip地址 * </pre> */ @Required @XStreamAlias("spbill_create_ip") private String spbillCreateIp; /** * <pre> * 字段名:付款场景. * 变量名:scene * 是否必填:否 * 示例值:BRAND_REDPACKET * 类型:String(64) * 描述:BRAND_REDPACKET:品牌红包,其他值或不传则默认为普通付款到零钱 * </pre> */ @XStreamAlias("scene") private String scene; /** * <pre> * 字段名:品牌ID. * 变量名:brand_id * 是否必填:否 * 示例值:1234 * 类型:int * 描述:品牌在微信支付的唯一标识。仅在付款场景为品牌红包时必填 * </pre> */ @XStreamAlias("brand_id") private Integer brandId; /** * <pre> * 字段名:消息模板ID. * 变量名:finder_template_id * 是否必填:否 * 示例值:1243100000000000 * 类型:String(128) * 描述:品牌所配置的消息模板的唯一标识。仅在付款场景为品牌红包时必填。 * </pre> */ @XStreamAlias("finder_template_id") private String finderTemplateId; @Override protected void checkConstraints() { } @Override public String getAppid() { return this.mchAppid; } @Override public void setAppid(String appid) { this.mchAppid = appid; } @Override public String getMchId() { return this.mchId; } @Override public void setMchId(String mchId) { this.mchId = mchId; } @Override protected String[] getIgnoredParamsForSign() { return new String[]{"sign_type"}; } @Override protected void storeMap(Map<String, String> map) { map.put("mch_appid", mchAppid); map.put("mchid", mchId); map.put("device_info", deviceInfo); map.put("partner_trade_no", partnerTradeNo); map.put("openid", openid); map.put("check_name", checkName); map.put("re_user_name", reUserName); map.put("amount", amount.toString()); map.put("desc", description); map.put("spbill_create_ip", spbillCreateIp); map.put("scene", scene); map.put("brand_id", brandId.toString()); map.put("finder_template_id", finderTemplateId); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/entpay/EntPayRedpackResult.java
package com.github.binarywang.wxpay.bean.entpay; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * 企业微信红包返回 * * @author wuyong * created on 2019-12-01 11:31 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class EntPayRedpackResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 1L; /** * 商户订单号 * 商户订单号(每个订单号必须唯一)组成:mch_id+yyyymmdd+10位一天内不能重复的数字 */ @XStreamAlias("mch_billno") private String mchBillNo; /** * 商户号 * 微信支付分配的商户号 */ @XStreamAlias("mch_id") private String mchId; /** * 公众账号appid * 商户appid,接口传入的所有appid应该为公众号的appid,不能为APP的appid */ @XStreamAlias("wxappid") private String wxAppId; /** * 用户openid * 接受收红包的用户在wxappid下的openid */ @XStreamAlias("re_openid") private String reOpenid; /** * 付款金额 * 付款金额,单位分 */ @XStreamAlias("total_amount") private String totalAmount; /** * 微信单号 * 红包订单的微信单号 */ @XStreamAlias("send_listid") private String sendListId; /** * 发送者名称 * 红包发送者名称(需要utf-8格式) */ @XStreamAlias("sender_name") private String senderName; /** * 发送者头像 * 发送者头像素材id,通过企业微信开放上传素材接口获取 */ @XStreamAlias("sender_header_media_id") private String senderHeaderMediaId; @Override protected void loadXml(Document d) { mchBillNo = readXmlString(d, "mch_billno"); mchId = readXmlString(d, "mch_id"); wxAppId = readXmlString(d, "wxappid"); reOpenid = readXmlString(d, "re_openid"); totalAmount = readXmlString(d, "total_amount"); sendListId = readXmlString(d, "send_listid"); senderName = readXmlString(d, "sender_name"); senderHeaderMediaId = readXmlString(d, "sender_header_media_id"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/Receiver.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/Receiver.java
package com.github.binarywang.wxpay.bean.profitsharing; import com.github.binarywang.wxpay.v3.SpecEncrypt; import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.annotations.SerializedName; import java.io.Serializable; /** * @author Wang GuangXin 2019/10/22 11:07 * @version 1.0 */ public class Receiver implements Serializable { /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 1、MERCHANT_ID:商户号 * 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账金额 * 是否必填:是 * 描述: 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 * </pre> */ @SerializedName("amount") private Integer amount; /** * <pre> * 字段名:分账描述 * 是否必填:是 * 描述: 分账的原因描述,分账账单中需要体现 * </pre> */ @SerializedName("description") private String description; /** * <pre> * 字段名:分账个人接收方姓名 * 是否必填:否 * 描述: * 可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求 * 1、分账接收方类型是PERSONAL_OPENID,是个人姓名的密文(选传,传则校验) 此字段的加密方法详见:敏感信息加密说明 * 2、使用微信支付平台证书中的公钥 * 3、使用RSAES-OAEP算法进行加密 * 4、将请求中HTTP头部的Wechatpay-Serial设置为证书序列号 * </pre> */ @SerializedName("name") @SpecEncrypt private String name; /** * <pre> * 字段名:与分账方的关系类型 * 是否必填:是 * 描述:子商户与接收方的关系。 本字段值为枚举: * STORE:门店 * STAFF:员工 * STORE_OWNER:店主 * PARTNER:合作伙伴 * HEADQUARTER:总部 * BRAND:品牌方 * DISTRIBUTOR:分销商 * USER:用户 * SUPPLIER: 供应商 * CUSTOM:自定义 * </pre> */ @SerializedName("relation_type") private String relationType; /** * <pre> * 字段名:自定义的分账关系 * 是否必填:是 * 描述:子商户与接收方具体的关系,本字段最多10个字。 * 当字段relationType的值为CUSTOM时,本字段必填; * 当字段relationType的值不为CUSTOM时,本字段无需填写。 * </pre> */ @SerializedName("custom_relation") private String customRelation; /** * 此构造函数用于单次分账 * * @param type MERCHANT_ID:商户ID * PERSONAL_WECHATID:个人微信号PERSONAL_OPENID:个人openid(由父商户APPID转换得到)PERSONAL_SUB_OPENID: 个人sub_openid(由子商户APPID转换得到) * @param account 类型是MERCHANT_ID时,是商户ID * 类型是PERSONAL_WECHATID时,是个人微信号 * 类型是PERSONAL_OPENID时,是个人openid * 类型是PERSONAL_SUB_OPENID时,是个人sub_openid * @param amount 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 * @param description 分账的原因描述,分账账单中需要体现 */ public Receiver(String type, String account, Integer amount, String description) { this.type = type; this.account = account; this.amount = amount; this.description = description; } /** * 此构造用于添加分账方 * * @param type MERCHANT_ID:商户ID * PERSONAL_WECHATID:个人微信号PERSONAL_OPENID:个人openid(由父商户APPID转换得到)PERSONAL_SUB_OPENID: 个人sub_openid(由子商户APPID转换得到) * @param account 类型是MERCHANT_ID时,是商户ID * 类型是PERSONAL_WECHATID时,是个人微信号 * 类型是PERSONAL_OPENID时,是个人openid * 类型是PERSONAL_SUB_OPENID时,是个人sub_openid * @param name 分账接收方类型是MERCHANT_ID时,是商户全称(必传) * 分账接收方类型是PERSONAL_NAME 时,是个人姓名(必传) * 分账接收方类型是PERSONAL_OPENID时,是个人姓名(选传,传则校验) * 分账接收方类型是PERSONAL_SUB_OPENID时,是个人姓名(选传,传则校验) * @param relationType 子商户与接收方的关系。 * 本字段值为枚举: * SERVICE_PROVIDER:服务商 * STORE:门店 * STAFF:员工 * STORE_OWNER:店主 * PARTNER:合作伙伴 * HEADQUARTER:总部 * BRAND:品牌方 * DISTRIBUTOR:分销商 * USER:用户 * SUPPLIER:供应商 * CUSTOM:自定义 * @param customRelation 子商户与接收方具体的关系,本字段最多10个字。 * 当字段relation_type的值为CUSTOM时,本字段必填 * 当字段relation_type的值不为CUSTOM时,本字段无需填写 */ public Receiver(String type, String account, String name, String relationType, String customRelation) { this.type = type; this.account = account; this.name = name; this.relationType = relationType; this.customRelation = customRelation; } /** * 用于删除分账接受方 * * @param type MERCHANT_ID:商户ID * PERSONAL_WECHATID:个人微信号PERSONAL_OPENID:个人openid(由父商户APPID转换得到)PERSONAL_SUB_OPENID: 个人sub_openid(由子商户APPID转换得到) * @param account 类型是MERCHANT_ID时,是商户ID * 类型是PERSONAL_WECHATID时,是个人微信号 * 类型是PERSONAL_OPENID时,是个人openid * 类型是PERSONAL_SUB_OPENID时,是个人sub_openid */ public Receiver(String type, String account) { this.type = type; this.account = account; } public String toJSONString() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); Gson gson = gsonBuilder.create(); return gson.toJson(this); } public String getType() { return type; } public String getAccount() { return account; } public Integer getAmount() { return amount; } public String getDescription() { return description; } public String getName() { return name; } public String getRelationType() { return relationType; } public String getCustomRelation() { return customRelation; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/ReceiverList.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/ReceiverList.java
package com.github.binarywang.wxpay.bean.profitsharing; import com.google.gson.Gson; import java.io.Serializable; import java.util.ArrayList; /** * @author Wang GuangXin 2019/10/22 11:01 * @version 1.0 */ public class ReceiverList implements Serializable { private static final long serialVersionUID = -1316860887694489921L; ArrayList<Receiver> list; private ReceiverList() { } /** * 获取一个实例 * @return */ public static ReceiverList getInstance() { ReceiverList receiverList = new ReceiverList(); receiverList.list = new ArrayList<>(); return receiverList; } /** * 添加一个分账条目 * 注意微信上限为50个 * @param receiver * @return */ public ReceiverList add(Receiver receiver) { this.list.add(receiver); return this; } /** * 转为JSON格式 * @return */ public String toJSONString() { Gson gson = new Gson(); return gson.toJson(this.list); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingOrderAmountQueryV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingOrderAmountQueryV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.google.gson.annotations.SerializedName; import lombok.Data; import java.io.Serializable; /** * 微信V3接口 * 查询剩余待分金额API返回实体 * * @author pg * created on 2021-6-25 */ @Data public class ProfitSharingOrderAmountQueryV3Result implements Serializable { private static final long serialVersionUID = -7025255772409082288L; /** * <pre> * 字段名:微信订单号 * 是否必填:是 * 描述:微信支付订单号 * </pre> */ @SerializedName("transaction_id") private String transactionId; /** * <pre> * 字段名:订单剩余待分金额 * 是否必填:是 * 描述:订单剩余待分金额,整数,单元为分 * </pre> */ @SerializedName("unsplit_amount") private String unsplitAmount; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReceiverV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReceiverV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.v3.SpecEncrypt; import com.google.gson.annotations.SerializedName; import lombok.Data; import java.io.Serializable; /** * @author 添加/删除分账接收方结果 * @version 1.0 */ @Data public class ProfitSharingReceiverV3Result implements Serializable { private static final long serialVersionUID = 876204163877798066L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 1、MERCHANT_ID:商户号 * 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账个人接收方姓名 * 是否必填:否 * 描述: * 可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求 * 1、分账接收方类型是PERSONAL_OPENID,是个人姓名的密文(选传,传则校验) 此字段的加密方法详见:敏感信息加密说明 * 2、使用微信支付平台证书中的公钥 * 3、使用RSAES-OAEP算法进行加密 * 4、将请求中HTTP头部的Wechatpay-Serial设置为证书序列号 * </pre> */ @SerializedName("name") @SpecEncrypt private String name; /** * <pre> * 字段名:与分账方的关系类型 * 是否必填:是 * 描述:子商户与接收方的关系。 本字段值为枚举: * STORE:门店 * STAFF:员工 * STORE_OWNER:店主 * PARTNER:合作伙伴 * HEADQUARTER:总部 * BRAND:品牌方 * DISTRIBUTOR:分销商 * USER:用户 * SUPPLIER: 供应商 * CUSTOM:自定义 * </pre> */ @SerializedName("relation_type") private String relationType; /** * <pre> * 字段名:自定义的分账关系 * 是否必填:是 * 描述:子商户与接收方具体的关系,本字段最多10个字。 * 当字段relationType的值为CUSTOM时,本字段必填; * 当字段relationType的值不为CUSTOM时,本字段无需填写。 * </pre> */ @SerializedName("custom_relation") private String customRelation; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingUnfreezeV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingUnfreezeV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.google.gson.annotations.SerializedName; import lombok.Data; import java.io.Serializable; import java.util.List; /** * 微信V3接口 * 解冻剩余资金API返回实体 * * @author pg * created on 2021-6-25 */ @Data public class ProfitSharingUnfreezeV3Result implements Serializable { private static final long serialVersionUID = 5053171678880645337L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号 * </pre> */ @SerializedName("sub_mchid") private String subMchid; /** * <pre> * 字段名:微信订单号 * 是否必填:是 * 描述:微信支付订单号 * </pre> */ @SerializedName("transaction_id") private String transactionId; /** * <pre> * 字段名:商户分账单号 * 是否必填:是 * 描述:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:微信分账单号 * 是否必填:是 * 描述:微信分账单号,微信系统返回的唯一标识。 * </pre> */ @SerializedName("order_id") private String orderId; /** * <pre> * 字段名:分账单状态 * 是否必填:是 * 描述:分账单状态(每个接收方的分账结果请查看receivers中的result字段),枚举值: * 1、PROCESSING:处理中 * 2、FINISHED:分账完成 * </pre> */ @SerializedName("state") private String state; /** * 分账接收方列表 */ @SerializedName("receivers") private List<Receiver> receivers; @Data public static class Receiver implements Serializable { private static final long serialVersionUID = 4240983048700956806L; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 1、MERCHANT_ID:商户号 * 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账金额 * 是否必填:是 * 描述: 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 * </pre> */ @SerializedName("amount") private Long amount; /** * <pre> * 字段名:分账描述 * 是否必填:是 * 描述: 分账的原因描述,分账账单中需要体现 * </pre> */ @SerializedName("description") private String description; /** * <pre> * 字段名:分账结果 * 是否必填:是 * 描述: * 1、PENDING:待分账 * 2、SUCCESS:分账成功 * 3、CLOSED:已关闭 * </pre> */ @SerializedName("result") private String result; /** * <pre> * 字段名:分账失败原因 * 是否必填:是 * 描述:枚举值: * 1、PENDING:待分账 * 2、SUCCESS:分账成功 * 3、CLOSED:已关闭 * </pre> */ @SerializedName("fail_reason") private String failReason; /** * <pre> * 字段名:分账创建时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("create_time") private String createTime; /** * <pre> * 字段名:分账完成时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("finish_time") private String finishTime; /** * <pre> * 字段名:分账明细单号 * 是否必填:是 * 描述:微信分账明细单号,每笔分账业务执行的明细单号,可与资金账单对账使用 * </pre> */ @SerializedName("detail_id") private String detailId; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingBillV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingBillV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import java.io.Serializable; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; /** * 微信V3接口-申请分账账单结果类 * * @author 狂龙骄子 * @since 4.4.0 * @date 2022-12-09 */ @Data @NoArgsConstructor public class ProfitSharingBillV3Result implements Serializable { private static final long serialVersionUID = -704896948531566657L; /** * <pre> * 字段名:账单下载地址 * 变量名:download_url * 是否必填:是 * 类型:string[1,2048] * 描述: * 供下一步请求账单文件的下载地址,该地址30s内有效。 * 示例值:https://api.mch.weixin.qq.com/v3/bill/downloadurl?token=xxx * </pre> */ @SerializedName(value = "download_url") private String downloadUrl; /** * <pre> * 字段名:哈希类型 * 变量名:hash_type * 是否必填:是 * 类型:string[1, 32] * 描述: * 原始账单(gzip需要解压缩)的摘要值,用于校验文件的完整性。 * 示例值:SHA1 * </pre> */ @SerializedName(value = "hash_type") private String hashType; /** * <pre> * 字段名:哈希值 * 变量名:hash_value * 是否必填:是 * 类型:string[1,1024] * 描述: * 原始账单(gzip需要解压缩)的摘要值,用于校验文件的完整性。 * 示例值:79bb0f45fc4c42234a918000b2668d689e2bde04 * </pre> */ @SerializedName(value = "hash_value") private String hashValue; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReceiverResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReceiverResult.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * @author Wang GuangXin 2019/10/22 14:54 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingReceiverResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 876204163877798066L; /** * 分账接收方. */ @XStreamAlias("receiver") private String receiver; @Override protected void loadXml(Document d) { receiver = readXmlString(d, "receiver"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReturnResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReturnResult.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * @author Wang GuangXin 2019/10/23 14:41 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingReturnResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 718554909816994568L; /** * 如果返回状态码为FAIL,则本字段存在,且为失败的错误码. */ @XStreamAlias("error_code") private String errorCode; /** * 如果返回状态码为FAIL,则本字段存在,且为失败的错误信息. */ @XStreamAlias("error_msg") private String errorMsg; /** * 微信分账单号 */ @XStreamAlias("order_id") private String orderId; /** * 商户分账单号 */ @XStreamAlias("out_order_no") private String outOrderNo; /** * 商户回退单号 */ @XStreamAlias("out_return_no") private String outReturnNo; /** * 微信回退单号 */ @XStreamAlias("return_no") private String returnNo; /** * 回退方类型 */ @XStreamAlias("return_account_type") private String returnAccountType; /** * 回退方账号 */ @XStreamAlias("return_account") private String returnAccount; /** * 回退金额 */ @XStreamAlias("return_amount") private Integer returnAmount; /** * 回退描述 */ @XStreamAlias("description") private String description; /** * 回退结果 */ @XStreamAlias("result") private String result; /** * 失败原因 */ @XStreamAlias("fail_reason") private String failReason; /** * 完成时间 */ @XStreamAlias("finish_time") private String finishTime; @Override protected void loadXml(Document d) { orderId = readXmlString(d, "order_id"); outOrderNo = readXmlString(d, "out_order_no"); outReturnNo = readXmlString(d, "out_return_no"); returnNo = readXmlString(d, "return_no"); returnAccountType = readXmlString(d, "return_account_type"); returnAccount = readXmlString(d, "return_account"); returnAmount = readXmlInteger(d, "return_amount"); description = readXmlString(d, "description"); result = readXmlString(d, "result"); failReason = readXmlString(d, "fail_reason"); finishTime = readXmlString(d, "finish_time"); } @Override public String getErrCode() { return this.errorCode; } @Override public String getErrCodeDes() { return this.errorMsg; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingOrderAmountQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingOrderAmountQueryResult.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * @author : cofedream * created on : 2020-12-29 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingOrderAmountQueryResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 7355605400662796198L; /** * 微信订单号. */ @XStreamAlias("transaction_id") private String transactionId; /** * 订单剩余待分金额. */ @XStreamAlias("unsplit_amount") private Integer unSplitAmount; @Override protected void loadXml(Document d) { transactionId = readXmlString(d, "transaction_id"); unSplitAmount = readXmlInteger(d, "unsplit_amount"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingResult.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.w3c.dom.Document; import java.io.Serializable; import java.util.Collections; import java.util.List; /** * @author Wang GuangXin 2019/10/22 10:06 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 7435709584788869456L; /** * GSON工具 */ private static final Gson GSON = new GsonBuilder().create(); /** * 微信订单号. */ @XStreamAlias("transaction_id") private String transactionId; /** * 商户分账单号. */ @XStreamAlias("out_order_no") private String outOrderNo; /** * 微信分账单号. */ @XStreamAlias("order_id") private String orderId; /** * 分账单状态. */ @XStreamAlias("status") private String status; /** * 分账接收方列表 */ @XStreamAlias("receivers") private String receivers; /** * 分账接收方列表 */ private List<Receiver> receiverList; /** * 获取分账接收方列表方法 * */ public List<Receiver> getReceiverList() { if (receiverList != null) { return receiverList; } if (StringUtils.isNotEmpty(receivers)) { this.receiverList = GSON.fromJson(receivers, new TypeToken<List<Receiver>>() { }.getType()); return receiverList; } return Collections.emptyList(); } @Override protected void loadXml(Document d) { transactionId = readXmlString(d, "transaction_id"); outOrderNo = readXmlString(d, "out_order_no"); orderId = readXmlString(d, "order_id"); status = readXmlString(d, "status"); receivers = readXmlString(d, "receivers"); } /** * 分账接收方列表对象 */ @Data public static class Receiver implements Serializable { private static final long serialVersionUID = 4240983048700956806L; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 枚举值: * MERCHANT_ID:商户号(mch_id或者sub_mch_id) * PERSONAL_OPENID:个人openid(由服务商的APPID转换得到) * PERSONAL_SUB_OPENID:个人sub_openid(由品牌主的APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账金额 * 是否必填:是 * 描述: 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 * </pre> */ @SerializedName("amount") private Integer amount; /** * <pre> * 字段名:分账接收商户号 * 是否必填:是 * 描述: 仅分账接收方类型为MERCHANT_ID时,填写微信支付分配的商户号 * </pre> */ @SerializedName(("receiver_mchid")) private String receiverMchid; /** * <pre> * 字段名:分账描述 * 是否必填:是 * 描述: 分账的原因描述,分账账单中需要体现 * </pre> */ @SerializedName("description") private String description; /** * <pre> * 字段名:分账结果 * 是否必填:是 * 描述: * 1、PENDING:待分账 * 2、SUCCESS:分账成功 * 3、CLOSED:已关闭 * </pre> */ @SerializedName("result") private String result; /** * <pre> * 字段名:分账失败原因 * 是否必填:是 * 描述:包含以下枚举值: * 1、ACCOUNT_ABNORMAL : 分账接收账户异常 * 2、NO_RELATION : 分账关系已解除 * 3、RECEIVER_HIGH_RISK : 高风险接收方 * 4、RECEIVER_REAL_NAME_NOT_VERIFIED : 接收方未实名 * 5、NO_AUTH : 分账权限已解除 * </pre> */ @SerializedName("fail_reason") private String failReason; /** * <pre> * 字段名:分账创建时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("create_time") private String createTime; /** * <pre> * 字段名:分账完成时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("finish_time") private String finishTime; /** * <pre> * 字段名:微信分账明细单号 * 是否必填:是 * 每笔分账业务执行的明细单号,可与资金账单对账使用, * 例如:36011111111111111111111 * </pre> */ @SerializedName("detail_id") private String detailId; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingMerchantRatioQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingMerchantRatioQueryResult.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; /** * @author : cofedream * created on : 2020-12-28 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingMerchantRatioQueryResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 7556620112016338659L; /** * 服务商模式下的子商户号.<br/> * 2000<br/> * 子商户允许服务商分账的最大比例,单位万分比,比如2000表示20% */ @XStreamAlias("max_ratio") private Integer maxRatio; @Override protected void loadXml(Document d) { maxRatio = readXmlInteger(d, "max_ratio"); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingMerchantRatioQueryV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingMerchantRatioQueryV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import java.io.Serializable; import com.google.gson.annotations.SerializedName; import lombok.Data; /** * 微信V3接口-查询特约商户设置的允许服务商分账的最大比例结果类 * * @author 狂龙骄子 * @since 4.4.0 * @date 2022-12-09 */ @Data public class ProfitSharingMerchantRatioQueryV3Result implements Serializable { private static final long serialVersionUID = -6259241881199571683L; /** 子商户号 */ @SerializedName("sub_mchid") private String subMchId; /** 子商户允许服务商分账的最大比例,单位万分比,比如 2000表示20% */ @SerializedName("max_ratio") private Integer maxRatio; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingQueryResult.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingQueryResult.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.github.binarywang.wxpay.bean.result.BaseWxPayResult; import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import org.w3c.dom.Document; import java.io.Serializable; import java.util.List; /** * @author Wang GuangXin 2019/10/22 15:51 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingQueryResult extends BaseWxPayResult implements Serializable { private static final long serialVersionUID = 2548673608075775067L; /** * 微信订单号 */ @XStreamAlias("transaction_id") private String transactionId; /** * 商户分账单号 */ @XStreamAlias("out_order_no") private String outOrderNo; /** * 微信分账单号 */ @XStreamAlias("order_id") private String orderId; /** * 分账单状态 */ @XStreamAlias("status") private String status; /** * 关单原因 */ @XStreamAlias("close_reason") private String closeReason; /** * 分账接收方列表 */ @XStreamAlias("receivers") private String receiversJson; /** * 分账接收方列表json转换后的对象 */ private List<Receiver> receivers; /** * 分账金额 */ @XStreamAlias("amount") private Integer amount; /** * 分账描述 */ @XStreamAlias("description") private String description; public List<Receiver> formatReceivers() { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES); Gson gson = gsonBuilder.create(); final List<Receiver> receivers = gson.fromJson(receiversJson, new TypeToken<List<Receiver>>() { }.getType()); this.receivers = receivers; return receivers; } @Override protected void loadXml(Document d) { transactionId = readXmlString(d, "transaction_id"); outOrderNo = readXmlString(d, "out_order_no"); orderId = readXmlString(d, "order_id"); status = readXmlString(d, "status"); closeReason = readXmlString(d, "close_reason"); receiversJson = readXmlString(d, "receivers"); amount = readXmlInteger(d, "amount"); description = readXmlString(d, "description"); } @Data public static class Receiver { /** * 分账接收方类型 */ private String type; /** * 分账接收方帐号 */ private String account; /** * 分账金额 */ private Integer amount; /** * 分账描述 */ private String description; /** * 分账结果 */ private String result; /** * 分账完成时间 */ private String finishTime; /** * 分账失败原因 */ private String failReason; /** * 分账明细单号 */ private String detailId; @Override public String toString() { return "Receivers{" + "type='" + type + '\'' + ", account='" + account + '\'' + ", amount=" + amount + ", description='" + description + '\'' + ", result='" + result + '\'' + ", finishTime='" + finishTime + '\'' + ", failReason='" + failReason + '\'' + ", detailId='" + detailId + '\'' + '}'; } } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.google.gson.annotations.SerializedName; import lombok.Data; import java.io.Serializable; import java.util.List; /** * 微信V3接口 * 请求分账API返回的分账结果实体 * * @author pg * created on 2021-6-24 */ @Data public class ProfitSharingV3Result implements Serializable { private static final long serialVersionUID = -6201692412535987502L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:微信订单号 * 是否必填:是 * 描述:微信支付订单号 * </pre> */ @SerializedName("transaction_id") private String transactionId; /** * <pre> * 字段名:商户分账单号 * 是否必填:是 * 描述:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:微信分账单号, * 是否必填:是 * 描述:微信系统返回的唯一标识. * </pre> */ @SerializedName("order_id") private String orderId; /** * <pre> * 字段名:分账单状态 * 是否必填:是 * 描述:分账单状态(每个接收方的分账结果请查看receivers中的result字段): * 1、PROCESSING:处理中 * 2、FINISHED:分账完成. * </pre> */ @SerializedName("state") private String state; /** * 分账接收方列表 */ @SerializedName("receivers") private List<Receiver> receivers; @Data public static class Receiver implements Serializable { private static final long serialVersionUID = 4240983048700956806L; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 1、MERCHANT_ID:商户号 * 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账金额 * 是否必填:是 * 描述: 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 * </pre> */ @SerializedName("amount") private Integer amount; /** * <pre> * 字段名:分账描述 * 是否必填:是 * 描述: 分账的原因描述,分账账单中需要体现 * </pre> */ @SerializedName("description") private String description; /** * <pre> * 字段名:分账结果 * 是否必填:是 * 描述: * 1、PENDING:待分账 * 2、SUCCESS:分账成功 * 3、CLOSED:已关闭 * </pre> */ @SerializedName("result") private String result; /** * <pre> * 字段名:分账失败原因 * 是否必填:是 * 描述:包含以下枚举值: * 1、ACCOUNT_ABNORMAL : 分账接收账户异常 * 2、NO_RELATION : 分账关系已解除 * 3、RECEIVER_HIGH_RISK : 高风险接收方 * 4、RECEIVER_REAL_NAME_NOT_VERIFIED : 接收方未实名 * 5、NO_AUTH : 分账权限已解除 * </pre> */ @SerializedName("fail_reason") private String failReason; /** * <pre> * 字段名:分账创建时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("create_time") private String createTime; /** * <pre> * 字段名:分账完成时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("finish_time") private String finishTime; /** * <pre> * 字段名:微信分账明细单号 * 是否必填:是 * 每笔分账业务执行的明细单号,可与资金账单对账使用, * 例如:36011111111111111111111 * </pre> */ @SerializedName("detail_id") private String detailId; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReturnV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/result/ProfitSharingReturnV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.result; import com.google.gson.annotations.SerializedName; import lombok.Data; import java.io.Serializable; /** * 微信V3接口 * 请求分账回退API返回实体 * * @author pg * created on 2021-6-25 */ @Data public class ProfitSharingReturnV3Result implements Serializable { private static final long serialVersionUID = -2175582517588397426L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:分账回退的接收商户,对应原分账出资的分账方商户,填写微信支付分配的商户号 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:微信分账单号 * 是否必填:是 * 描述:微信分账单号,微信系统返回的唯一标识。 * </pre> */ @SerializedName("order_id") private String orderId; /** * <pre> * 字段名:商户分账单号 * 是否必填:是 * 描述:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:商户回退单号 * 是否必填:是 * 描述:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 * </pre> */ @SerializedName("out_return_no") private String outReturnNo; /** * <pre> * 字段名:微信回退单号 * 是否必填:是 * 描述:微信分账回退单号,微信系统返回的唯一标识 * </pre> */ @SerializedName("return_id") private String returnId; /** * <pre> * 字段名:回退商户号 * 是否必填:是 * 描述:分账回退的出资商户,只能对原分账请求中成功分给商户接收方进行回退 * </pre> */ @SerializedName("return_mchid") private String returnMchid; /** * <pre> * 字段名:回退金额 * 是否必填:是 * 描述:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 * </pre> */ private Long amount; /** * <pre> * 字段名:回退描述 * 是否必填:是 * 描述: 分账回退的原因描述 * </pre> */ private String description; /** * <pre> * 字段名:分账结果 * 是否必填:是 * 描述: * 如果请求返回为处理中,则商户可以通过调用回退结果查询接口获取请求的最终处理结果。 * 如果查询到回退结果在处理中,请勿变更商户回退单号,使用相同的参数再次发起分账回退,否则会出现资金风险。 * 在处理中状态的回退单如果5天没有成功,会因为超时被设置为已失败。 * PROCESSING:处理中 * SUCCESS:已成功 * FAILED:已失败 * </pre> */ @SerializedName("result") private String result; /** * <pre> * 字段名:失败原因 * 是否必填:是 * 描述:失败原因。包含以下枚举值: * ACCOUNT_ABNORMAL : 分账接收方账户异常 * TIME_OUT_CLOSED : 超时关单 * </pre> */ @SerializedName("fail_reason") private String failReason; /** * <pre> * 字段名:分账回退创建时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("create_time") private String createTime; /** * <pre> * 字段名:分账回退完成时间 * 是否必填:是 * 描述:遵循rfc3339标准格式,格式为YYYY-MM-DDTHH:mm:ss.sss+TIMEZONE, * YYYY-MM-DD表示年月日,T出现在字符串中,表示time元素的开头, * HH:mm:ss.sss表示时分秒毫秒, * TIMEZONE表示时区(+08:00表示东八区时间,领先UTC 8小时,即北京时间)。 * 例如:2015-05-20T13:29:35.120+08:00表示,北京时间2015年5月20日 13点29分35秒。 * </pre> */ @SerializedName("finish_time") private String finishTime; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/notify/ProfitSharingNotifyV3Result.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/notify/ProfitSharingNotifyV3Result.java
package com.github.binarywang.wxpay.bean.profitsharing.notify; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * * 微信V3接口 * 分账动账通知解密后数据实体 * * @author yuanbo * @since 2022-04-26-21:08 PM */ @Data @NoArgsConstructor public class ProfitSharingNotifyV3Result implements Serializable { private static final long serialVersionUID = -2875006651351414624L; /** * <pre> * 字段名:直连商户号 * 是否必填:是 * 描述:直连模式分账发起和出资商户 * </pre> */ @SerializedName("mchid") private String mchId; /** * <pre> * 字段名:服务商商户号 * 是否必填:是 * 描述:服务商模式分账发起商户。 * </pre> */ @SerializedName("sp_mchid") private String spMchid; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:服务商模式分账出资商户。 * </pre> */ @SerializedName("sub_mchid") private String subMchid; /** * <pre> * 字段名:微信订单号 * 是否必填:是 * 描述:微信支付订单号 * </pre> */ @SerializedName("transaction_id") private String transactionId; /** * <pre> * 字段名:微信分账/回退单号 * 是否必填:是 * 描述:微信分账/回退单号 * </pre> */ @SerializedName("order_id") private String orderId; /** * <pre> * 字段名:商户分账/回退单号 * 是否必填:是 * 描述:分账方系统内部的分账/回退单号 * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:分账接收方 * 是否必填:是 * 描述:分账接收方对象 * </pre> */ @SerializedName("receiver") private Receiver receiver; /** * <pre> * 字段名:成功时间 * 是否必填:是 * 描述:成功时间,Rfc3339标准 * </pre> */ @SerializedName("success_time") private String successTime; @Data @NoArgsConstructor public static class Receiver implements Serializable { private static final long serialVersionUID = -931070141604645363L; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述:MERCHANT_ID:商户号(mch_id或者sub_mch_id) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方账号 * 是否必填:是 * 描述:申请本功能商户号 * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账动账金额 * 是否必填:是 * 描述:分账动账金额,单位为分,只能为整数 * </pre> */ @SerializedName("amount") private Integer amount; /** * <pre> * 字段名:分账/回退描述 * 是否必填:是 * 描述:分账/回退描述 * </pre> */ @SerializedName("description") private String description; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/notify/ProfitSharingNotifyV3Response.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/notify/ProfitSharingNotifyV3Response.java
package com.github.binarywang.wxpay.bean.profitsharing.notify; import com.google.gson.annotations.SerializedName; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * * 微信V3接口 * 通用通知实体 * * @author yuanbo * @since 2022-04-26-21:33 PM */ @Data @NoArgsConstructor public class ProfitSharingNotifyV3Response implements Serializable{ private static final long serialVersionUID = 4242383310854692441L; /** * <pre> * 字段名:通知ID * 是否必填:是 * 描述:通知的唯一ID * </pre> */ @SerializedName("id") private String id; /** * <pre> * 字段名:通知创建时间 * 是否必填:是 * 描述:通知创建的时间,Rfc3339标准 * </pre> */ @SerializedName("create_time") private String createTime; /** * <pre> * 字段名:通知数据类型 * 是否必填:是 * 描述:通知的资源数据类型 * </pre> */ @SerializedName("resource_type") private String resourceType; /** * <pre> * 字段名:通知类型 * 是否必填:是 * 描述:通知的类型 * </pre> */ @SerializedName("event_type") private String eventType; /** * <pre> * 字段名:通知数据 * 是否必填:是 * 描述:通知资源数据 * </pre> */ @SerializedName("resource") private Resource resource; /** * <pre> * 字段名:通知简要说明 * 是否必填:是 * 描述:通知简要说明 * </pre> */ @SerializedName("summary") private String summary; @Data @NoArgsConstructor public static class Resource implements Serializable { private static final long serialVersionUID = 8530711804335261449L; /** * <pre> * 字段名:加密算法类型 * 是否必填:是 * 描述:对分账结果数据进行加密的加密算法,目前只支持AEAD_AES_256_GCM * </pre> */ @SerializedName("algorithm") private String algorithm; /** * <pre> * 字段名:加密前的对象类型 * 是否必填:是 * 描述:加密前的对象类型,分账动账通知的类型为profitsharing * </pre> */ @SerializedName("original_type") private String originalType; /** * <pre> * 字段名:数据密文 * 是否必填:是 * 描述:Base64编码后的分账结果数据密文 * </pre> */ @SerializedName("ciphertext") private String cipherText; /** * <pre> * 字段名:随机串 * 是否必填:是 * 描述:加密使用的随机串 * </pre> */ @SerializedName("nonce") private String nonce; /** * <pre> * 字段名:附加数据 * 是否必填:否 * 描述:附加数据 * </pre> */ @SerializedName("associated_data") private String associatedData; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingMerchantRatioQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingMerchantRatioQueryRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import java.util.Map; /** * @author : cofedream * created on : 2020-12-28 */ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor @XStreamAlias("xml") public class ProfitSharingMerchantRatioQueryRequest extends BaseWxPayRequest { private static final long serialVersionUID = 2773455587673225334L; public ProfitSharingMerchantRatioQueryRequest(String subMchId) { this.subMchId = subMchId; } @Override protected void checkConstraints() throws WxPayException { // 目前仅支持HMAC-SHA256. this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override public boolean ignoreAppid() { return true; } @Override protected boolean ignoreSubAppId() { return true; } @Override protected void storeMap(Map<String, String> map) { } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingV3Request.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.v3.SpecEncrypt; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; import java.util.List; /** * 微信V3接口 * 请求分账API请求实体 * * @author pg * created on 2021-6-24 */ @Data @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor public class ProfitSharingV3Request implements Serializable { private static final long serialVersionUID = 3644929701624280800L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:应用ID * 是否必填:是 * 描述:微信分配的商户appid * </pre> */ @SerializedName("appid") private String appid; /** * <pre> * 字段名:子商户应用ID * 是否必填:否 * 描述:子商户的公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填 * </pre> */ @SerializedName("sub_appid") private String subAppid; /** * <pre> * 字段名:微信订单号 * 是否必填:是 * 描述:微信支付订单号 * </pre> */ @SerializedName("transaction_id") private String transactionId; /** * <pre> * 字段名:商户分账单号 * 是否必填:是 * 描述:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:分账接收方列表 * 是否必填:是 * 描述:分账接收方列表,可以设置出资商户作为分账接受方,最多可有50个分账接收方 * </pre> */ @SpecEncrypt @SerializedName("receivers") private List<Receiver> receivers; /** * <pre> * 字段名:是否解冻剩余未分资金 * 是否必填:是 * 描述: * 1、如果为true,该笔订单剩余未分账的金额会解冻回分账方商户; * 2、如果为false,该笔订单剩余未分账的金额不会解冻回分账方商户,可以对该笔订单再次进行分账。 * </pre> */ @SerializedName("unfreeze_unsplit") private boolean unfreezeUnsplit; /** * 分账接收方实体 */ @Data @NoArgsConstructor public static class Receiver implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 1、MERCHANT_ID:商户号 * 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账金额 * 是否必填:是 * 描述: 分账金额,单位为分,只能为整数,不能超过原订单支付金额及最大分账比例金额 * </pre> */ @SerializedName("amount") private Integer amount; /** * <pre> * 字段名:分账个人接收方姓名 * 是否必填:否 * 描述: * 可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求 * 1、分账接收方类型是PERSONAL_OPENID,是个人姓名的密文(选传,传则校验) 此字段的加密方法详见:敏感信息加密说明 * 2、使用微信支付平台证书中的公钥 * 3、使用RSAES-OAEP算法进行加密 * 4、将请求中HTTP头部的Wechatpay-Serial设置为证书序列号 * </pre> */ @SerializedName("name") @SpecEncrypt private String name; /** * <pre> * 字段名:与分账方的关系类型 * 是否必填:是 * 描述:子商户与接收方的关系。 本字段值为枚举: * STORE:门店 * STAFF:员工 * STORE_OWNER:店主 * PARTNER:合作伙伴 * HEADQUARTER:总部 * BRAND:品牌方 * DISTRIBUTOR:分销商 * USER:用户 * SUPPLIER: 供应商 * CUSTOM:自定义 * </pre> */ @SerializedName("relation_type") private String relationType; /** * <pre> * 字段名:自定义的分账关系 * 是否必填:是 * 描述:子商户与接收方具体的关系,本字段最多10个字。 * 当字段relationType的值为CUSTOM时,本字段必填; * 当字段relationType的值不为CUSTOM时,本字段无需填写。 * </pre> */ @SerializedName("custom_relation") private String customRelation; /** * <pre> * 字段名:分账描述 * 是否必填:是 * 描述: 分账的原因描述,分账账单中需要体现 * </pre> */ private String description; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * @author Wang GuangXin 2019/10/21 17:57 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingRequest extends BaseWxPayRequest { private static final long serialVersionUID = 212049937430575842L; /** * <pre> * 字段名:微信订单号. * 变量名:transaction_id * 是否必填:是 * String(32) * 示例值:4208450740201411110007820472 * 描述:微信支付订单号 * </pre> */ @XStreamAlias("transaction_id") @Required private String transactionId; /** * <pre> * 字段名:商户分账单号. * 变量名:out_order_no * 是否必填:是 * String(64) * 示例值:P20150806125346 * 描述:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @XStreamAlias("out_order_no") @Required private String outOrderNo; /** * <pre> * 字段名:分账接收方列表. * 变量名:receivers * 是否必填:是 * String(10240) * 示例值:[ * { * "type": "MERCHANT_ID", * "account":"190001001", * "amount":100, * "description": "分到商户" * }, * { * "type": "PERSONAL_WECHATID", * "account":"86693952", * "amount":888, * "description": "分到个人" * } * ] * 描述:分账接收方列表,不超过50个json对象,不能设置分账方作为分账接受方,使用Json格式 * </pre> */ @XStreamAlias("receivers") @Required private String receivers; @Override protected void checkConstraints() throws WxPayException { // 目前仅支持HMAC-SHA256. this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override protected void storeMap(Map<String, String> map) { map.put("transaction_id", transactionId); map.put("out_order_no", outOrderNo); map.put("receivers", receivers); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingQueryRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import lombok.experimental.Accessors; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * @author Wang GuangXin 2019/10/22 15:44 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @Accessors(chain = true) @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingQueryRequest extends BaseWxPayRequest { private static final long serialVersionUID = 3566332883053157102L; /** * <pre> * 字段名:微信支付订单号. * 变量名:transaction_id * 是否必填:是 * String(32) * 示例值:4208450740201411110007820472 * 描述:微信支付订单号 * </pre> */ @XStreamAlias("transaction_id") @Required private String transactionId; /** * <pre> * 字段名:商户分账单号. * 变量名:out_order_no * 是否必填:是 * String(64) * 示例值:P20150806125346 * 描述:查询分账结果,输入申请分账时的商户分账单号; 查询分账完结的执行结果,输入发起分账完结时的商户分账单号 * </pre> */ @XStreamAlias("out_order_no") @Required private String outOrderNo; @Override protected void checkConstraints() throws WxPayException { this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override public boolean ignoreAppid() { return true; } @Override protected boolean ignoreSubAppId() { return true; } @Override protected void storeMap(Map<String, String> map) { map.put("transaction_id", transactionId); map.put("out_order_no", outOrderNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingQueryV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingQueryV3Request.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.google.gson.annotations.SerializedName; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.io.Serializable; /** * @author lyt 2023/08/21 15:44 * @version 1.0 */ @Data @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor public class ProfitSharingQueryV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:微信支付订单号. * 变量名:transaction_id * 是否必填:是 * String(32) * 示例值:4208450740201411110007820472 * 描述:微信支付订单号 * </pre> */ @XStreamAlias("transaction_id") @Required private String transactionId; /** * <pre> * 字段名:商户分账单号. * 变量名:out_order_no * 是否必填:是 * String(64) * 示例值:P20150806125346 * 描述:查询分账结果,输入申请分账时的商户分账单号; 查询分账完结的执行结果,输入发起分账完结时的商户分账单号 * </pre> */ @XStreamAlias("out_order_no") @Required private String outOrderNo; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingBillV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingBillV3Request.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import java.io.Serializable; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; /** * 微信V3接口-申请分账账单请求类 * * @author 狂龙骄子 * @since 4.4.0 * @date 2022-12-09 */ @Data @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor public class ProfitSharingBillV3Request implements Serializable { private static final long serialVersionUID = 5200819754873844593L; /** * <pre> * 字段名:子商户号 * 是否必填:否 * 描述:不填则默认返回服务商下的所有分账账单。如需下载某个子商户下的分账账单,则填指定的子商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:账单日期 * 是否必填:是 * 描述:格式yyyy-MM-DD,仅支持三个月内的账单下载申请。 * </pre> */ @SerializedName("bill_date") private String billDate; /** * <pre> * 字段名:压缩类型 * 是否必填:否 * 描述:不填则默认是数据流。枚举值:GZIP:返回格式为.gzip的压缩包账单。 * </pre> */ @SerializedName("tar_type") private String tarType; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReturnRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReturnRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import org.apache.commons.lang3.StringUtils; import java.util.Map; /** * @author Wang GuangXin 2019/10/23 14:27 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingReturnRequest extends BaseWxPayRequest { private static final long serialVersionUID = 5926280401474809744L; /** * <pre> * 字段名:微信分账单号. * 变量名:order_id * 是否必填:二选一 * string(64) * 示例值:3008450740201411110007820472 * 描述:原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 * 微信分账单号与商户分账单号二选一填写 * </pre> */ @XStreamAlias("order_id") private String orderId; /** * <pre> * 字段名:商户分账单号. * 变量名:out_order_no * 是否必填:二选一 * Sstring(64) * 示例值:P20180806125346 * 描述:原发起分账请求时使用的商户后台系统的分账单号。 * 微信分账单号与商户分账单号二选一填写 * </pre> */ @XStreamAlias("out_order_no") private String outOrderNo; /** * <pre> * 字段名:商户回退单号. * 变量名:out_return_no * 是否必填:是 * string(64) * 示例值:R20190516001 * 描述:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 * 只能是数字、大小写字母_-|*@ ,同一回退单号多次请求等同一次。 * </pre> */ @Required @XStreamAlias("out_return_no") private String outReturnNo; /** * <pre> * 字段名:回退方类型. * 变量名:return_account_type * 是否必填:是 * String(32) * 示例值:MERCHANT_ID * 描述:枚举值: * MERCHANT_ID:商户ID * 暂时只支持从商户接收方回退分账金额 * </pre> */ @Required @XStreamAlias("return_account_type") private String returnAccountType; /** * <pre> * 字段名:回退方账号. * 变量名:return_account * 是否必填:是 * String(64) * 示例值:86693852 * 描述:回退方类型是MERCHANT_ID时,填写商户ID * 只能对原分账请求中成功分给商户接收方进行回退 * </pre> */ @Required @XStreamAlias("return_account") private String returnAccount; /** * <pre> * 字段名:回退金额. * 变量名:return_amount * 是否必填:是 * int * 示例值:888 * 描述:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 * </pre> */ @Required @XStreamAlias("return_amount") private Integer returnAmount; /** * <pre> * 字段名:回退描述. * 变量名:description * 是否必填:是 * String(80) * 示例值:用户退款 * 描述:分账回退的原因描述 * </pre> */ @Required @XStreamAlias("description") private String description; @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isBlank(orderId) && StringUtils.isBlank(outOrderNo)) { throw new WxPayException("order_id 和 outOrderNo 必须有一个存在"); } this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override protected void storeMap(Map<String, String> map) { map.put("order_id", orderId); map.put("out_order_no", outOrderNo); map.put("out_return_no", outReturnNo); map.put("return_account_type", returnAccountType); map.put("return_account", returnAccount); map.put("return_amount", returnAmount.toString()); map.put("description", description); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingUnfreezeV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingUnfreezeV3Request.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * 微信V3接口 * 解冻剩余资金API请求实体 * * @author pg * created on 2021-6-25 */ @Data @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor public class ProfitSharingUnfreezeV3Request implements Serializable { private static final long serialVersionUID = 6835471990040104843L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:微信订单号 * 是否必填:是 * 描述:微信支付订单号 * </pre> */ @SerializedName("transaction_id") private String transactionId; /** * <pre> * 字段名:商户分账单号 * 是否必填:是 * 描述:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:分账描述 * 是否必填:是 * 描述: 分账的原因描述,分账账单中需要体现 * </pre> */ @SerializedName("description") private String description; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingOrderAmountQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingOrderAmountQueryRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * @author : cofedream * created on : 2020-12-29 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingOrderAmountQueryRequest extends BaseWxPayRequest { private static final long serialVersionUID = 6009448187615691627L; /** * <pre> * 字段名:微信订单号. * 变量名:transaction_id * 是否必填:是 * String(32) * 示例值:4208450740201411110007820472 * 描述:微信支付订单号 * </pre> */ @XStreamAlias("transaction_id") @Required private String transactionId; @Override protected void checkConstraints() throws WxPayException { // 目前仅支持HMAC-SHA256. this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override public boolean ignoreAppid() { return true; } @Override protected boolean ignoreSubAppId() { return true; } @Override protected void storeMap(Map<String, String> map) { map.put("transaction_id", transactionId); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingUnfreezeRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingUnfreezeRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * 解冻剩余资金API请求实体 * @author Wang GuangXin 2019/10/23 14:02 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingUnfreezeRequest extends BaseWxPayRequest { private static final long serialVersionUID = -4265779954583596627L; /** * <pre> * 字段名:微信订单号. * 变量名:transaction_id * 是否必填:是 * String(32) * 示例值:4208450740201411110007820472 * 描述:微信支付订单号 * </pre> */ @XStreamAlias("transaction_id") @Required private String transactionId; /** * <pre> * 字段名:商户分账单号. * 变量名:out_order_no * 是否必填:是 * String(64) * 示例值:P20150806125346 * 描述:商户系统内部的分账单号,在商户系统内部唯一(单次分账、多次分账、完结分账应使用不同的商户分账单号),同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @XStreamAlias("out_order_no") @Required private String outOrderNo; /** * <pre> * 字段名:分账完结描述. * 变量名:out_order_no * 是否必填:是 * String(80) * 示例值:分账已完成 * 描述:分账完结的原因描述 * </pre> */ @XStreamAlias("description") @Required private String description; @Override protected void checkConstraints() { this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override protected boolean ignoreSubAppId() { return true; } @Override protected void storeMap(Map<String, String> map) { map.put("transaction_id", transactionId); map.put("out_order_no", outOrderNo); map.put("description", description); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReceiverRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReceiverRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import java.util.Map; /** * 添加/删除分账接受方请求对象 * * @author Wang GuangXin 2019/10/22 13:41 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingReceiverRequest extends BaseWxPayRequest { private static final long serialVersionUID = 2628263563539120323L; /** * <pre> * 字段名:分账接收方. * 变量名:receiver * 是否必填:是 * String(2048) * 示例值:{ * "type": "MERCHANT_ID", * "account": "190001001", * "name": "示例商户全称", * "relation_type": "STORE_OWNER" * } * 描述:分账接收方对象,json格式 * </pre> */ @XStreamAlias("receiver") @Required private String receiver; @Override protected void checkConstraints() throws WxPayException { this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override protected void storeMap(Map<String, String> map) { map.put("receiver", receiver); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReturnV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReturnV3Request.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.google.gson.annotations.SerializedName; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; /** * 微信V3接口 * 请求分账回退API请求实体 * * @author pg * created on 2021-6-25 */ @Data @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor public class ProfitSharingReturnV3Request implements Serializable { private static final long serialVersionUID = -2175582517588397426L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:分账回退的接收商户,对应原分账出资的分账方商户,填写微信支付分配的商户号 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:微信分账单号 * 是否必填:是 * 描述:微信分账单号,微信系统返回的唯一标识。 * </pre> */ @SerializedName("order_id") private String orderId; /** * <pre> * 字段名:商户分账单号 * 是否必填:是 * 描述:商户系统内部的分账单号,在商户系统内部唯一,同一分账单号多次请求等同一次。只能是数字、大小写字母_-|*@ * </pre> */ @SerializedName("out_order_no") private String outOrderNo; /** * <pre> * 字段名:商户回退单号 * 是否必填:是 * 描述:此回退单号是商户在自己后台生成的一个新的回退单号,在商户后台唯一 * </pre> */ @SerializedName("out_return_no") private String outReturnNo; /** * <pre> * 字段名:回退商户号 * 是否必填:是 * 描述:分账回退的出资商户,只能对原分账请求中成功分给商户接收方进行回退 * </pre> */ @SerializedName("return_mchid") private String returnMchid; /** * <pre> * 字段名:回退金额 * 是否必填:是 * 描述:需要从分账接收方回退的金额,单位为分,只能为整数,不能超过原始分账单分出给该接收方的金额 * </pre> */ private Long amount; /** * <pre> * 字段名:回退描述 * 是否必填:是 * 描述: 分账回退的原因描述 * </pre> */ private String description; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReceiverV3Request.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReceiverV3Request.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.v3.SpecEncrypt; import com.google.gson.annotations.SerializedName; import lombok.*; import java.io.Serializable; /** * 添加/删除分账接受方请求对象 * * @author lyt 2023-08-23 10:09:21 * @version 1.0 */ @Data @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor public class ProfitSharingReceiverV3Request implements Serializable { private static final long serialVersionUID = 1L; /** * <pre> * 字段名:子商户号 * 是否必填:是 * 描述:微信支付分配的子商户号,即分账的出资商户号。 * </pre> */ @SerializedName("sub_mchid") private String subMchId; /** * <pre> * 字段名:应用ID * 是否必填:是 * 描述:微信分配的商户appid * </pre> */ @SerializedName("appid") private String appid; /** * <pre> * 字段名:子商户应用ID * 是否必填:否 * 描述:子商户的公众账号ID,分账接收方类型包含PERSONAL_SUB_OPENID时必填 * </pre> */ @SerializedName("sub_appid") private String subAppid; /** * <pre> * 字段名:分账接收方类型 * 是否必填:是 * 描述: * 1、MERCHANT_ID:商户号 * 2、PERSONAL_OPENID:个人openid(由父商户APPID转换得到) * </pre> */ @SerializedName("type") private String type; /** * <pre> * 字段名:分账接收方帐号 * 是否必填:是 * 描述: * 1、分账接收方类型为MERCHANT_ID时,分账接收方账号为商户号 * 2、分账接收方类型为PERSONAL_OPENID时,分账接收方账号为个人openid * </pre> */ @SerializedName("account") private String account; /** * <pre> * 字段名:分账个人接收方姓名 * 是否必填:否 * 描述: * 可选项,在接收方类型为个人的时可选填,若有值,会检查与 name 是否实名匹配,不匹配会拒绝分账请求 * 1、分账接收方类型是PERSONAL_OPENID,是个人姓名的密文(选传,传则校验) 此字段的加密方法详见:敏感信息加密说明 * 2、使用微信支付平台证书中的公钥 * 3、使用RSAES-OAEP算法进行加密 * 4、将请求中HTTP头部的Wechatpay-Serial设置为证书序列号 * </pre> */ @SerializedName("name") @SpecEncrypt private String name; /** * <pre> * 字段名:与分账方的关系类型 * 是否必填:是 * 描述:子商户与接收方的关系。 本字段值为枚举: * STORE:门店 * STAFF:员工 * STORE_OWNER:店主 * PARTNER:合作伙伴 * HEADQUARTER:总部 * BRAND:品牌方 * DISTRIBUTOR:分销商 * USER:用户 * SUPPLIER: 供应商 * CUSTOM:自定义 * </pre> */ @SerializedName("relation_type") private String relationType; /** * <pre> * 字段名:自定义的分账关系 * 是否必填:是 * 描述:子商户与接收方具体的关系,本字段最多10个字。 * 当字段relationType的值为CUSTOM时,本字段必填; * 当字段relationType的值不为CUSTOM时,本字段无需填写。 * </pre> */ @SerializedName("custom_relation") private String customRelation; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReturnQueryRequest.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/profitsharing/request/ProfitSharingReturnQueryRequest.java
package com.github.binarywang.wxpay.bean.profitsharing.request; import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; import com.github.binarywang.wxpay.constant.WxPayConstants; import com.github.binarywang.wxpay.exception.WxPayException; import com.thoughtworks.xstream.annotations.XStreamAlias; import lombok.*; import me.chanjar.weixin.common.annotation.Required; import org.apache.commons.lang3.StringUtils; import java.util.Map; /** * @author Wang GuangXin 2019/10/23 15:32 * @version 1.0 */ @Data @EqualsAndHashCode(callSuper = true) @Builder(builderMethodName = "newBuilder") @NoArgsConstructor @AllArgsConstructor @XStreamAlias("xml") public class ProfitSharingReturnQueryRequest extends BaseWxPayRequest { private static final long serialVersionUID = -8838464614726086009L; /** * <pre> * 字段名:微信分账单号. * 变量名:order_id * 是否必填:二选一 * string(64) * 示例值:3008450740201411110007820472 * 描述:原发起分账请求时,微信返回的微信分账单号,与商户分账单号一一对应。 * 微信分账单号与商户分账单号二选一填写 * </pre> */ @XStreamAlias("order_id") private String orderId; /** * <pre> * 字段名:商户分账单号. * 变量名:out_order_no * 是否必填:二选一 * Sstring(64) * 示例值:P20180806125346 * 描述:原发起分账请求时使用的商户后台系统的分账单号。 * 微信分账单号与商户分账单号二选一填写 * </pre> */ @XStreamAlias("out_order_no") private String outOrderNo; /** * <pre> * 字段名:商户回退单号. * 变量名:out_return_no * 是否必填:是 * string(64) * 示例值:R20190516001 * 描述:调用回退接口提供的商户系统内部的回退单号 * </pre> */ @Required @XStreamAlias("out_return_no") private String outReturnNo; @Override protected void checkConstraints() throws WxPayException { if (StringUtils.isBlank(orderId) && StringUtils.isBlank(outOrderNo)) { throw new WxPayException("order_id 和 outOrderNo 必须有一个存在"); } this.setSignType(WxPayConstants.SignType.HMAC_SHA256); } @Override protected boolean ignoreSubAppId() { return true; } @Override protected void storeMap(Map<String, String> map) { map.put("order_id", orderId); map.put("out_order_no", outOrderNo); map.put("out_return_no", outReturnNo); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/VerifierBuilder.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/VerifierBuilder.java
package com.github.binarywang.wxpay.config; import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.v3.auth.*; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.apache.commons.lang3.StringUtils; import java.nio.charset.StandardCharsets; import java.security.PrivateKey; import java.security.PublicKey; /** * 验证器构建. * * @author holy */ @NoArgsConstructor(access = AccessLevel.PRIVATE) class VerifierBuilder { /** * 构建验证器. * <p> * 场景 * <pre> * 1. 老商户号,只有平台证书,未开通公钥 (已验证) * 2. 新商户号,被强制开通公钥,没有平台证书 (已验证) * 3. 老商户号,有平台证书,主动开通公钥 (未验证,具备条件的朋友,可以帮忙验证下) * ... * </pre> * * @param certSerialNo c * @param mchId m * @param apiV3Key a * @param merchantPrivateKey m * @param wxPayHttpProxy w * @param certAutoUpdateTime c * @param payBaseUrl p * @param publicKeyId p * @param publicKey p * @return v * @throws WxPayException e */ @SuppressWarnings("java:S107") static Verifier build( // 平台证书 - 依赖参数 String certSerialNo, String mchId, String apiV3Key, PrivateKey merchantPrivateKey, WxPayHttpProxy wxPayHttpProxy, int certAutoUpdateTime, String payBaseUrl, // 公钥 - 依赖参数 String publicKeyId, PublicKey publicKey ) throws WxPayException { Verifier certificatesVerifier = null; Exception ex = null; // 构建平台证书验证器 // (沿用旧逻辑)优先构建平台证书验证器,因为公钥验证器需要平台证书验证器 (见以下 .setOtherVerifier ) // 新商户号默认无平台证书,已确认无法构建平台证书验证器,会抛出异常;老商户号,有平台证书主动开通公钥的情况,待具备条件的朋友验证 // 建议公钥模式稳定后,优先构建公钥验证器,以免每次都尝试构建平台证书验证器,且失败 {@link com.github.binarywang.wxpay.v3.auth.PublicCertificateVerifier.verify} if (merchantPrivateKey != null && StringUtils.isNoneBlank(certSerialNo, apiV3Key)) { try { certificatesVerifier = getCertificatesVerifier( certSerialNo, mchId, apiV3Key, merchantPrivateKey, wxPayHttpProxy, certAutoUpdateTime, payBaseUrl ); } catch (Exception e) { ex = e; } } // 构建公钥验证器 if (publicKey != null && StringUtils.isNotBlank(publicKeyId)) { try { certificatesVerifier = getPublicCertVerifier(publicKeyId, publicKey, certificatesVerifier); } catch (Exception e) { ex = e; } } if (certificatesVerifier != null) { return certificatesVerifier; } // 有异常时抛出 if (ex != null) { throw new WxPayException(ex.getMessage(), ex); } // 没有证书验证器时。不确定是否抛出异常,沿用之前逻辑,返回 null return null; } /** * 针对完全使用公钥的场景 * @param publicKeyId 公钥id * @param publicKey 公钥 * @return */ static Verifier buildPublicCertVerifier(String publicKeyId, PublicKey publicKey) { return getPublicCertVerifier(publicKeyId, publicKey, null); } /** * 获取证书验证器. * * @param certSerialNo certSerialNo * @param mchId mchId * @param apiV3Key apiV3Key * @param merchantPrivateKey merchantPrivateKey * @param wxPayHttpProxy wxPayHttpProxy * @param certAutoUpdateTime certAutoUpdateTime * @param payBaseUrl payBaseUrl * @return verifier */ private static AutoUpdateCertificatesVerifier getCertificatesVerifier( String certSerialNo, String mchId, String apiV3Key, PrivateKey merchantPrivateKey, WxPayHttpProxy wxPayHttpProxy, int certAutoUpdateTime, String payBaseUrl ) { return new AutoUpdateCertificatesVerifier( new WxPayCredentials(mchId, new PrivateKeySigner(certSerialNo, merchantPrivateKey)), apiV3Key.getBytes(StandardCharsets.UTF_8), certAutoUpdateTime, payBaseUrl, wxPayHttpProxy); } /** * 获取公钥验证器. * * @param publicKeyId id * @param publicKey key * @param certificatesVerifier verifier * @return verifier */ private static Verifier getPublicCertVerifier(String publicKeyId, PublicKey publicKey, Verifier certificatesVerifier) { Verifier publicCertificatesVerifier = new PublicCertificateVerifier(publicKey, publicKeyId); publicCertificatesVerifier.setOtherVerifier(certificatesVerifier); certificatesVerifier = publicCertificatesVerifier; return certificatesVerifier; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayHttpProxy.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayHttpProxy.java
package com.github.binarywang.wxpay.config; import java.io.Serializable; /** * 微信支付 HTTP Proxy 正向代理配置 * * @author Long Yu * created on 2021-12-28 15:49:03 */ public class WxPayHttpProxy implements Serializable { /** * 代理主机 */ private String httpProxyHost; /** * 代理端口 */ private Integer httpProxyPort; /** * 代理用户名称 */ private String httpProxyUsername; /** * 代理密码 */ private String httpProxyPassword; public WxPayHttpProxy() { } public WxPayHttpProxy(String httpProxyHost, Integer httpProxyPort, String httpProxyUsername, String httpProxyPassword) { this.httpProxyHost = httpProxyHost; this.httpProxyPort = httpProxyPort; this.httpProxyUsername = httpProxyUsername; this.httpProxyPassword = httpProxyPassword; } public String getHttpProxyHost() { return httpProxyHost; } public void setHttpProxyHost(String httpProxyHost) { this.httpProxyHost = httpProxyHost; } public Integer getHttpProxyPort() { return httpProxyPort; } public void setHttpProxyPort(Integer httpProxyPort) { this.httpProxyPort = httpProxyPort; } public String getHttpProxyUsername() { return httpProxyUsername; } public void setHttpProxyUsername(String httpProxyUsername) { this.httpProxyUsername = httpProxyUsername; } public String getHttpProxyPassword() { return httpProxyPassword; } public void setHttpProxyPassword(String httpProxyPassword) { this.httpProxyPassword = httpProxyPassword; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfig.java
package com.github.binarywang.wxpay.config; import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.util.HttpProxyUtils; import com.github.binarywang.wxpay.util.ResourcesUtils; import com.github.binarywang.wxpay.v3.WxPayV3HttpClientBuilder; import com.github.binarywang.wxpay.v3.auth.Verifier; import com.github.binarywang.wxpay.v3.auth.WxPayValidator; import com.github.binarywang.wxpay.v3.util.PemUtils; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.SneakyThrows; import lombok.ToString; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RegExUtils; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.config.Registry; import org.apache.http.config.RegistryBuilder; import org.apache.http.conn.socket.ConnectionSocketFactory; import org.apache.http.conn.socket.PlainConnectionSocketFactory; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.conn.ssl.DefaultHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.ssl.SSLContexts; import javax.net.ssl.SSLContext; import java.io.*; import java.net.URL; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.security.PrivateKey; import java.security.PublicKey; import java.security.cert.Certificate; import java.security.cert.X509Certificate; import java.util.Base64; import java.util.Optional; /** * 微信支付配置 * * @author Binary Wang (<a href="https://github.com/binarywang">...</a>) */ @Data @Slf4j @ToString(exclude = "verifier") @EqualsAndHashCode(exclude = "verifier") public class WxPayConfig { private static final String DEFAULT_PAY_BASE_URL = "https://api.mch.weixin.qq.com"; private static final String PROBLEM_MSG = "证书文件【%s】有问题,请核实!"; private static final String NOT_FOUND_MSG = "证书文件【%s】不存在,请核实!"; private static final String CERT_NAME_P12 = "p12证书"; /** * 微信支付接口请求地址域名部分. */ private String apiHostUrl = DEFAULT_PAY_BASE_URL; /** * http请求连接超时时间. */ private int httpConnectionTimeout = 5000; /** * http请求数据读取等待时间. */ private int httpTimeout = 10000; /** * 公众号appid. */ private String appId; /** * 服务商模式下的子商户公众账号ID. */ private String subAppId; /** * 商户号. */ private String mchId; /** * 商户密钥. */ private String mchKey; /** * 企业支付密钥. */ private String entPayKey; /** * 服务商模式下的子商户号. */ private String subMchId; /** * 微信支付异步回掉地址,通知url必须为直接可访问的url,不能携带参数. */ private String notifyUrl; /** * 交易类型. * <pre> * JSAPI--公众号支付 * NATIVE--原生扫码支付 * APP--app支付 * </pre> */ private String tradeType; /** * 签名方式. * 有两种HMAC_SHA256 和MD5 * * @see com.github.binarywang.wxpay.constant.WxPayConstants.SignType */ private String signType; private SSLContext sslContext; /** * p12证书base64编码 */ private String keyString; /** * p12证书文件的绝对路径或者以classpath:开头的类路径. */ private String keyPath; /** * apiclient_key.pem证书base64编码 */ private String privateKeyString; /** * apiclient_key.pem证书文件的绝对路径或者以classpath:开头的类路径. */ private String privateKeyPath; /** * apiclient_cert.pem证书base64编码 */ private String privateCertString; /** * apiclient_cert.pem证书文件的绝对路径或者以classpath:开头的类路径. */ private String privateCertPath; /** * apiclient_key.pem证书文件内容的字节数组. */ private byte[] privateKeyContent; /** * apiclient_cert.pem证书文件内容的字节数组. */ private byte[] privateCertContent; /** * 公钥ID */ private String publicKeyId; /** * pub_key.pem证书base64编码 */ private String publicKeyString; /** * pub_key.pem证书文件的绝对路径或者以classpath:开头的类路径. */ private String publicKeyPath; /** * pub_key.pem证书文件内容的字节数组. */ private byte[] publicKeyContent; /** * apiV3 秘钥值. */ private String apiV3Key; /** * apiV3 证书序列号值 */ private String certSerialNo; /** * 微信支付分serviceId */ private String serviceId; /** * 微信支付分回调地址 */ private String payScoreNotifyUrl; /** * 微信支付分授权回调地址 */ private String payScorePermissionNotifyUrl; private CloseableHttpClient apiV3HttpClient; /** * 用于普通支付接口的可复用HttpClient,使用连接池 */ private CloseableHttpClient httpClient; /** * 用于需要SSL证书的支付接口的可复用HttpClient,使用连接池 */ private CloseableHttpClient sslHttpClient; /** * 支持扩展httpClientBuilder */ private HttpClientBuilderCustomizer httpClientBuilderCustomizer; private HttpClientBuilderCustomizer apiV3HttpClientBuilderCustomizer; /** * HTTP连接池最大连接数,默认20 */ private int maxConnTotal = 20; /** * HTTP连接池每个路由的最大连接数,默认10 */ private int maxConnPerRoute = 10; /** * 私钥信息 */ private PrivateKey privateKey; /** * 证书自动更新时间差(分钟),默认一分钟 */ private int certAutoUpdateTime = 60; /** * p12证书文件内容的字节数组. */ private byte[] keyContent; /** * 微信支付是否使用仿真测试环境. * 默认不使用 */ private boolean useSandboxEnv = false; /** * 是否将接口请求日志信息保存到threadLocal中. * 默认不保存 */ private boolean ifSaveApiData = false; private String httpProxyHost; private Integer httpProxyPort; private String httpProxyUsername; private String httpProxyPassword; /** * v3接口下证书检验对象,通过改对象可以获取到X509Certificate,进一步对敏感信息加密 * <a href="https://wechatpay-api.gitbook.io/wechatpay-api-v3/qian-ming-zhi-nan-1/min-gan-xin-xi-jia-mi">文档</a> */ private Verifier verifier; /** * 是否将全部v3接口的请求都添加Wechatpay-Serial请求头,默认不添加 */ private boolean strictlyNeedWechatPaySerial = false; /** * 是否完全使用公钥模式(用以微信从平台证书到公钥的灰度切换),默认不使用 */ private boolean fullPublicKeyModel = false; /** * 返回所设置的微信支付接口请求地址域名. * * @return 微信支付接口请求地址域名 */ public String getApiHostUrl() { if (StringUtils.isEmpty(this.apiHostUrl)) { return DEFAULT_PAY_BASE_URL; } return this.apiHostUrl; } @SneakyThrows public Verifier getVerifier() { if (verifier == null) { //当改对象为null时,初始化api v3的请求头 initApiV3HttpClient(); } return verifier; } /** * 初始化ssl. * * @return the ssl context * @throws WxPayException the wx pay exception */ public SSLContext initSSLContext() throws WxPayException { if (StringUtils.isBlank(this.getMchId())) { throw new WxPayException("请确保商户号mchId已设置"); } try (InputStream inputStream = this.loadConfigInputStream(this.keyString, this.getKeyPath(), this.keyContent, CERT_NAME_P12)) { KeyStore keystore = KeyStore.getInstance("PKCS12"); char[] partnerId2charArray = this.getMchId().toCharArray(); keystore.load(inputStream, partnerId2charArray); this.sslContext = SSLContexts.custom().loadKeyMaterial(keystore, partnerId2charArray).build(); return this.sslContext; } catch (Exception e) { throw new WxPayException("证书文件有问题,请核实!", e); } } /** * 初始化api v3请求头 自动签名验签 * 方法参照 <a href="https://github.com/wechatpay-apiv3/wechatpay-apache-httpclient">微信支付官方api项目</a> * * @return org.apache.http.impl.client.CloseableHttpClient * @author doger.wang **/ public CloseableHttpClient initApiV3HttpClient() throws WxPayException { if (StringUtils.isBlank(this.getApiV3Key())) { throw new WxPayException("请确保apiV3Key值已设置"); } try { PrivateKey merchantPrivateKey = null; PublicKey publicKey = null; // 不使用完全公钥模式时,同时兼容平台证书和公钥 X509Certificate certificate = null; // 尝试从p12证书中加载私钥和证书 Object[] objects = this.p12ToPem(); if (objects != null) { merchantPrivateKey = (PrivateKey) objects[0]; certificate = (X509Certificate) objects[1]; this.certSerialNo = certificate.getSerialNumber().toString(16).toUpperCase(); } if (certificate == null && StringUtils.isBlank(this.getCertSerialNo()) && (StringUtils.isNotBlank(this.getPrivateCertPath()) || StringUtils.isNotBlank(this.getPrivateCertString()) || this.getPrivateCertContent() != null)) { try (InputStream certInputStream = this.loadConfigInputStream(this.getPrivateCertString(), this.getPrivateCertPath(), this.privateCertContent, "privateCertPath")) { certificate = PemUtils.loadCertificate(certInputStream); } this.certSerialNo = certificate.getSerialNumber().toString(16).toUpperCase(); } if (StringUtils.isNotBlank(this.getPublicKeyString()) || StringUtils.isNotBlank(this.getPublicKeyPath()) || this.publicKeyContent != null) { if (StringUtils.isBlank(this.getPublicKeyId())) { throw new WxPayException("请确保和publicKeyId配套使用"); } try (InputStream pubInputStream = this.loadConfigInputStream(this.getPublicKeyString(), this.getPublicKeyPath(), this.publicKeyContent, "publicKeyPath")) { publicKey = PemUtils.loadPublicKey(pubInputStream); } } // 加载api私钥 if (merchantPrivateKey == null && (StringUtils.isNotBlank(this.getPrivateKeyPath()) || StringUtils.isNotBlank(this.getPrivateKeyString()) || null != this.privateKeyContent)) { try (InputStream keyInputStream = this.loadConfigInputStream(this.getPrivateKeyString(), this.getPrivateKeyPath(), this.privateKeyContent, "privateKeyPath")) { merchantPrivateKey = PemUtils.loadPrivateKey(keyInputStream); } } //构造Http Proxy正向代理 WxPayHttpProxy wxPayHttpProxy = getWxPayHttpProxy(); // 构造证书验签器 Verifier certificatesVerifier; if (this.fullPublicKeyModel) { // 使用完全公钥模式时,只加载公钥相关配置,避免下载平台证书使灰度切换无法达到100%覆盖 if (publicKey == null) { throw new WxPayException("完全公钥模式下,请确保公钥配置(publicKeyPath/publicKeyString/publicKeyContent)及publicKeyId已设置"); } certificatesVerifier = VerifierBuilder.buildPublicCertVerifier(this.publicKeyId, publicKey); } else { certificatesVerifier = VerifierBuilder.build( this.getCertSerialNo(), this.getMchId(), this.getApiV3Key(), merchantPrivateKey, wxPayHttpProxy, this.getCertAutoUpdateTime(), this.getApiHostUrl(), this.getPublicKeyId(), publicKey); } WxPayV3HttpClientBuilder wxPayV3HttpClientBuilder = WxPayV3HttpClientBuilder.create() .withMerchant(mchId, certSerialNo, merchantPrivateKey) .withValidator(new WxPayValidator(certificatesVerifier)); //初始化V3接口正向代理设置 HttpProxyUtils.initHttpProxy(wxPayV3HttpClientBuilder, wxPayHttpProxy); // 提供自定义wxPayV3HttpClientBuilder的能力 Optional.ofNullable(apiV3HttpClientBuilderCustomizer).ifPresent(e -> { e.customize(wxPayV3HttpClientBuilder); }); CloseableHttpClient httpClient = wxPayV3HttpClientBuilder.build(); this.apiV3HttpClient = httpClient; this.verifier = certificatesVerifier; this.privateKey = merchantPrivateKey; return httpClient; } catch (WxPayException e) { throw e; } catch (Exception e) { throw new WxPayException("v3请求构造异常!", e); } } /** * 初始化一个WxPayHttpProxy对象 * * @return 返回封装的WxPayHttpProxy对象。如未指定代理主机和端口,则默认返回null */ private WxPayHttpProxy getWxPayHttpProxy() { if (StringUtils.isNotBlank(this.getHttpProxyHost()) && this.getHttpProxyPort() > 0) { return new WxPayHttpProxy(getHttpProxyHost(), getHttpProxyPort(), getHttpProxyUsername(), getHttpProxyPassword()); } return null; } /** * 从指定参数加载输入流 * * @param configString 证书内容进行Base64加密后的字符串 * @param configPath 证书路径 * @param configContent 证书内容的字节数组 * @param certName 证书的标识 * @return 输入流 * @throws WxPayException 异常 */ private InputStream loadConfigInputStream(String configString, String configPath, byte[] configContent, String certName) throws WxPayException { if (configContent != null) { return new ByteArrayInputStream(configContent); } if (StringUtils.isNotEmpty(configString)) { // 判断是否为PEM格式的字符串(包含-----BEGIN和-----END标记) if (isPemFormat(configString)) { // PEM格式直接转为字节流,让PemUtils处理 configContent = configString.getBytes(StandardCharsets.UTF_8); } else { // 尝试Base64解码 try { byte[] decoded = Base64.getDecoder().decode(configString); // 检查解码后的内容是否为PEM格式(即用户传入的是base64编码的完整PEM文件) String decodedString = new String(decoded, StandardCharsets.UTF_8); if (isPemFormat(decodedString)) { // 解码后是PEM格式,使用解码后的内容 configContent = decoded; } else { // 解码后不是PEM格式,可能是: // 1. p12证书的二进制内容 - 应该返回解码后的二进制数据 // 2. 私钥/公钥的纯base64内容(不含PEM头尾) - 应该返回原始字符串,让PemUtils处理 // 通过certName区分:p12证书使用解码后的数据,其他情况返回原始字符串 if (CERT_NAME_P12.equals(certName)) { configContent = decoded; } else { // 对于私钥/公钥/证书,返回原始字符串字节,让PemUtils处理base64解码 configContent = configString.getBytes(StandardCharsets.UTF_8); } } } catch (IllegalArgumentException e) { // Base64解码失败,可能是格式不正确,抛出异常 throw new WxPayException(String.format("【%s】的Base64格式不正确", certName), e); } } return new ByteArrayInputStream(configContent); } if (StringUtils.isBlank(configPath)) { throw new WxPayException(String.format("请确保【%s】的文件地址【%s】存在", certName, configPath)); } return this.loadConfigInputStream(configPath); } /** * 判断字符串是否为PEM格式(包含-----BEGIN和-----END标记) * * @param content 要检查的字符串 * @return 是否为PEM格式 */ private boolean isPemFormat(String content) { return content != null && content.contains("-----BEGIN") && content.contains("-----END"); } /** * 从配置路径 加载配置 信息(支持 classpath、本地路径、网络url) * * @param configPath 配置路径 * @return . * @throws WxPayException . */ private InputStream loadConfigInputStream(String configPath) throws WxPayException { String fileHasProblemMsg = String.format(PROBLEM_MSG, configPath); String fileNotFoundMsg = String.format(NOT_FOUND_MSG, configPath); final String prefix = "classpath:"; InputStream inputStream; if (configPath.startsWith(prefix)) { String path = RegExUtils.removeFirst(configPath, prefix); if (!path.startsWith("/")) { path = "/" + path; } try { inputStream = ResourcesUtils.getResourceAsStream(path); if (inputStream == null) { throw new WxPayException(fileNotFoundMsg); } return inputStream; } catch (Exception e) { throw new WxPayException(fileNotFoundMsg, e); } } if (configPath.startsWith("http://") || configPath.startsWith("https://")) { try { inputStream = new URL(configPath).openStream(); if (inputStream == null) { throw new WxPayException(fileNotFoundMsg); } return inputStream; } catch (IOException e) { throw new WxPayException(fileNotFoundMsg, e); } } else { try { File file = new File(configPath); if (!file.exists()) { throw new WxPayException(fileNotFoundMsg); } //使用Files.newInputStream打开公私钥文件,会存在无法释放句柄的问题 //return Files.newInputStream(file.toPath()); return new FileInputStream(file); } catch (IOException e) { throw new WxPayException(fileHasProblemMsg, e); } } } /** * 分解p12证书文件 */ private Object[] p12ToPem() { String key = getMchId(); if (StringUtils.isBlank(key) || (StringUtils.isBlank(this.getKeyPath()) && this.keyContent == null && StringUtils.isBlank(this.keyString))) { return null; } // 分解p12证书文件 try (InputStream inputStream = this.loadConfigInputStream(this.keyString, this.getKeyPath(), this.keyContent, CERT_NAME_P12)) { KeyStore keyStore = KeyStore.getInstance("PKCS12"); keyStore.load(inputStream, key.toCharArray()); String alias = keyStore.aliases().nextElement(); PrivateKey privateKey = (PrivateKey) keyStore.getKey(alias, key.toCharArray()); Certificate certificate = keyStore.getCertificate(alias); X509Certificate x509Certificate = (X509Certificate) certificate; return new Object[]{privateKey, x509Certificate}; } catch (Exception e) { log.error("加载p12证书时发生异常", e); } return null; } /** * 初始化使用连接池的HttpClient * * @return CloseableHttpClient * @throws WxPayException 初始化异常 */ public CloseableHttpClient initHttpClient() throws WxPayException { if (this.httpClient != null) { return this.httpClient; } // 创建连接池管理器 PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); connectionManager.setMaxTotal(this.maxConnTotal); connectionManager.setDefaultMaxPerRoute(this.maxConnPerRoute); // 创建HttpClient构建器 org.apache.http.impl.client.HttpClientBuilder httpClientBuilder = HttpClients.custom() .setConnectionManager(connectionManager); // 配置代理 configureProxy(httpClientBuilder); // 提供自定义httpClientBuilder的能力 Optional.ofNullable(httpClientBuilderCustomizer).ifPresent(e -> { e.customize(httpClientBuilder); }); this.httpClient = httpClientBuilder.build(); return this.httpClient; } /** * 初始化使用连接池且支持SSL的HttpClient * * @return CloseableHttpClient * @throws WxPayException 初始化异常 */ public CloseableHttpClient initSslHttpClient() throws WxPayException { if (this.sslHttpClient != null) { return this.sslHttpClient; } // 初始化SSL上下文 SSLContext sslContext = this.getSslContext(); if (null == sslContext) { sslContext = this.initSSLContext(); } // 创建支持SSL的连接池管理器 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory( sslContext, new DefaultHostnameVerifier() ); Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder .<ConnectionSocketFactory>create() .register("https", sslsf) .register("http", PlainConnectionSocketFactory.getSocketFactory()) .build(); PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry); // PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); connectionManager.setMaxTotal(this.maxConnTotal); connectionManager.setDefaultMaxPerRoute(this.maxConnPerRoute); // 创建HttpClient构建器,配置SSL org.apache.http.impl.client.HttpClientBuilder httpClientBuilder = HttpClients.custom() .setConnectionManager(connectionManager) .setSSLSocketFactory(new SSLConnectionSocketFactory(sslContext, new DefaultHostnameVerifier())); // 配置代理 configureProxy(httpClientBuilder); // 提供自定义httpClientBuilder的能力 Optional.ofNullable(httpClientBuilderCustomizer).ifPresent(e -> { e.customize(httpClientBuilder); }); this.sslHttpClient = httpClientBuilder.build(); return this.sslHttpClient; } /** * 配置HTTP代理 */ private void configureProxy(org.apache.http.impl.client.HttpClientBuilder httpClientBuilder) { if (StringUtils.isNotBlank(this.getHttpProxyHost()) && this.getHttpProxyPort() > 0) { if (StringUtils.isEmpty(this.getHttpProxyUsername())) { this.setHttpProxyUsername("whatever"); } // 使用代理服务器 需要用户认证的代理服务器 CredentialsProvider provider = new BasicCredentialsProvider(); provider.setCredentials(new AuthScope(this.getHttpProxyHost(), this.getHttpProxyPort()), new UsernamePasswordCredentials(this.getHttpProxyUsername(), this.getHttpProxyPassword())); httpClientBuilder.setDefaultCredentialsProvider(provider) .setProxy(new HttpHost(this.getHttpProxyHost(), this.getHttpProxyPort())); } } /** * 获取用于普通支付接口的HttpClient * * @return CloseableHttpClient */ public CloseableHttpClient getHttpClient() { return httpClient; } /** * 获取用于SSL支付接口的HttpClient * * @return CloseableHttpClient */ public CloseableHttpClient getSslHttpClient() { return sslHttpClient; } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfigHolder.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/WxPayConfigHolder.java
package com.github.binarywang.wxpay.config; /** * 微信支付配置策略. * * @author zenghao * created on 2021/3/12 */ public class WxPayConfigHolder { private static final ThreadLocal<String> THREAD_LOCAL = ThreadLocal.withInitial(() -> "default"); /** * 获取当前微信支付配置策略. * @return 当前微信支付配置策略 */ public static String get() { return THREAD_LOCAL.get(); } /** * 设置当前微信支付配置策略. * @param label 策略名称 */ public static void set(final String label) { THREAD_LOCAL.set(label); } /** * 此方法需要用户根据自己程序代码,在适当位置手动触发调用,本SDK里无法判断调用时机. */ public static void remove() { THREAD_LOCAL.remove(); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/HttpClientBuilderCustomizer.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/config/HttpClientBuilderCustomizer.java
package com.github.binarywang.wxpay.config; import org.apache.http.impl.client.HttpClientBuilder; /** * @author <a href="https://github.com/ifcute">dagewang</a> */ @FunctionalInterface public interface HttpClientBuilderCustomizer { void customize(HttpClientBuilder var1); }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/WxPayV3HttpClientBuilder.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/WxPayV3HttpClientBuilder.java
package com.github.binarywang.wxpay.v3; import java.security.PrivateKey; import com.github.binarywang.wxpay.v3.auth.PrivateKeySigner; import com.github.binarywang.wxpay.v3.auth.WxPayCredentials; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.execchain.ClientExecChain; public class WxPayV3HttpClientBuilder extends HttpClientBuilder { private Credentials credentials; private Validator validator; static final String OS = System.getProperty("os.name") + "/" + System.getProperty("os.version"); static final String VERSION = System.getProperty("java.version"); private WxPayV3HttpClientBuilder() { super(); String userAgent = String.format( "WechatPay-Apache-HttpClient/%s (%s) Java/%s", getClass().getPackage().getImplementationVersion(), OS, VERSION == null ? "Unknown" : VERSION); setUserAgent(userAgent); } public static WxPayV3HttpClientBuilder create() { return new WxPayV3HttpClientBuilder(); } public WxPayV3HttpClientBuilder withMerchant(String merchantId, String serialNo, PrivateKey privateKey) { this.credentials = new WxPayCredentials(merchantId, new PrivateKeySigner(serialNo, privateKey)); return this; } public WxPayV3HttpClientBuilder withCredentials(Credentials credentials) { this.credentials = credentials; return this; } public WxPayV3HttpClientBuilder withValidator(Validator validator) { this.validator = validator; return this; } @Override public CloseableHttpClient build() { if (credentials == null) { throw new IllegalArgumentException("缺少身份认证信息"); } if (validator == null) { throw new IllegalArgumentException("缺少签名验证信息"); } return super.build(); } @Override protected ClientExecChain decorateProtocolExec(final ClientExecChain requestExecutor) { return new SignatureExec(this.credentials, this.validator, requestExecutor); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/Credentials.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/Credentials.java
package com.github.binarywang.wxpay.v3; import java.io.IOException; import org.apache.http.client.methods.HttpRequestWrapper; public interface Credentials { String getSchema(); String getToken(HttpRequestWrapper request) throws IOException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/WxPayV3DownloadHttpGet.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/WxPayV3DownloadHttpGet.java
package com.github.binarywang.wxpay.v3; import org.apache.http.client.methods.HttpGet; import java.net.URI; public class WxPayV3DownloadHttpGet extends HttpGet { public WxPayV3DownloadHttpGet() { } public WxPayV3DownloadHttpGet(URI uri) { super(uri); } public WxPayV3DownloadHttpGet(String uri) { super(uri); } }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false
binarywang/WxJava
https://github.com/binarywang/WxJava/blob/84b5c4d2d0774f800237634e5d0336f53c004fe3/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/Validator.java
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/v3/Validator.java
package com.github.binarywang.wxpay.v3; import java.io.IOException; import org.apache.http.client.methods.CloseableHttpResponse; public interface Validator { boolean validate(CloseableHttpResponse response) throws IOException; }
java
Apache-2.0
84b5c4d2d0774f800237634e5d0336f53c004fe3
2026-01-04T14:46:39.499027Z
false