From 80a35f30b984d4e561b17d27c5d57b25b89e5505 Mon Sep 17 00:00:00 2001 From: YT <306932545@qq.com> Date: Fri, 30 Aug 2024 11:25:18 +0000 Subject: [PATCH] =?UTF-8?q?:new:=20=E3=80=90=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E3=80=91=E6=96=B0=E5=A2=9E=20=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E6=94=B6=E4=BB=98=E9=80=9A=EF=BC=88=E8=A1=A5=E5=B7=AE=EF=BC=89?= =?UTF-8?q?=E7=9A=843=E4=B8=AA=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecommerce/SubsidiesCancelRequest.java | 61 +++++++ .../bean/ecommerce/SubsidiesCancelResult.java | 83 ++++++++++ .../ecommerce/SubsidiesCreateRequest.java | 105 ++++++++++++ .../bean/ecommerce/SubsidiesCreateResult.java | 126 ++++++++++++++ .../ecommerce/SubsidiesReturnRequest.java | 105 ++++++++++++ .../bean/ecommerce/SubsidiesReturnResult.java | 155 ++++++++++++++++++ .../wxpay/service/EcommerceService.java | 37 +++++ .../service/impl/EcommerceServiceImpl.java | 21 +++ 8 files changed, 693 insertions(+) create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateResult.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnRequest.java create mode 100644 weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnResult.java diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelRequest.java new file mode 100644 index 000000000..071fd8d31 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelRequest.java @@ -0,0 +1,61 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * add by 306932545@qq.com + * 取消补差请求对象 + *
+ * https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_3.shtml + *+ */ +@Data +@NoArgsConstructor +public class SubsidiesCancelRequest implements Serializable { + + /** + *
+ * 字段名:二级商户号 + * 变量名:sub_mchid + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补差的电商平台二级商户,填写微信支付分配的商户号。 + * 示例值:1900000109 + *+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+ * 字段名:微信订单号 + * 变量名:transaction_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信支付订单号。 + * 示例值: 4208450740201411110007820472 + *+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+ * 字段名:取消补差描述 + * 变量名:description + * 是否必填:是 + * 类型:string(80) + * 描述: + * 取消补差描述,查询的时候原样带回。 + * 示例值:订单退款 + *+ */ + @SerializedName(value = "description") + private String description; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelResult.java new file mode 100644 index 000000000..92234df1e --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCancelResult.java @@ -0,0 +1,83 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.*; + +import java.io.Serializable; + +/** + * add by 306932545@qq.com + * 取消补差返回对象 + *
+ * https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_1.shtml + *+ */ +@Data +@Builder +@ToString +@NoArgsConstructor(access = AccessLevel.PRIVATE) +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class SubsidiesCancelResult implements Serializable { + private static final long serialVersionUID = 5008480977464421822L; + + /** + *
+ * 字段名:二级商户号 + * 变量名:sub_mchid + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补差的电商平台二级商户,填写微信支付分配的商户号。 + * 示例值:1900000109 + *+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + + /** + *
+ * 字段名:微信订单号 + * 变量名:transaction_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信支付订单号。 + * 示例值: 4208450740201411110007820472 + *+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+ * 字段名:取消补差结果 + * 变量名:result + * 是否必填:是 + * 类型:string(16) + * 描述: + * 取消补差结果,枚举值: + * SUCCESS:成功 + * FAIL:失败 + * 示例值:SUCCESS + *+ */ + @SerializedName(value = "result") + private String result; + + /** + *
+ * 字段名:取消补差描述 + * 变量名:description + * 是否必填:是 + * 类型:string(80) + * 描述: + * 取消补差描述 + * 示例值:订单退款 + *+ */ + @SerializedName(value = "description") + private String description; + + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateRequest.java new file mode 100644 index 000000000..313a070ff --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateRequest.java @@ -0,0 +1,105 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * add by 306932545@qq.com + * 请求补差请求对象 + *
+ * https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_1.shtml + *+ */ +@Data +@NoArgsConstructor +public class SubsidiesCreateRequest implements Serializable { + + /** + *
+ * 字段名:二级商户号 + * 变量名:sub_mchid + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补差的电商平台二级商户,填写微信支付分配的商户号。 + * 示例值:1900000109 + *+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+ * 字段名:微信订单号 + * 变量名:transaction_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信支付订单号。 + * 示例值: 4208450740201411110007820472 + *+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+ * 字段名:商户补差单号 + * 变量名:out_subsidy_no + * 是否必填:是 + * 类型:string(64) + * 描述: + * 商户系统内部的补差单号,在商户系统内部唯一,同一补差单号多次请求等同一次。 + * 示例值:P20150806125347 + *+ */ + @SerializedName(value = "out_subsidy_no") + private String outSubsidyNo; + + /** + *
+ * 字段名:补差金额 + * 变量名:amount + * 是否必填:是 + * 类型:int64 + * 描述: + * 补差金额,单位为分,只能为整数,不能超过下单时候的最大补差金额。 + * 注意:单笔订单最高补差金额为10000元 + * 示例值:10 + *+ */ + @SerializedName(value = "amount") + private Integer amount; + + /** + *
+ * 字段名:补差描述 + * 变量名:description + * 是否必填:是 + * 类型:string(80) + * 描述: + * 补差备注描述,查询的时候原样带回。 + * 示例值:测试备注 + *+ */ + @SerializedName(value = "description") + private String description; + + /** + *
+ * 字段名:微信退款单号 + * 变量名:refund_id + * 是否必填:否 + * 类型:string(32) + * 描述: + * 微信退款单号,微信支付系统退款返回的唯一标识,当补差金额小于下单时候的金额,该字段必填 + * 示例值:3008450740201411110007820472 + *+ */ + @SerializedName(value = "refund_id") + private String refundId; + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateResult.java new file mode 100644 index 000000000..c3a4bd151 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesCreateResult.java @@ -0,0 +1,126 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.*; + +import java.io.Serializable; + +/** + * add by 306932545@qq.com + * 请求补差返回对象 + *
+ * https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_1.shtml + *+ */ +@Data +@Builder +@ToString +@NoArgsConstructor(access = AccessLevel.PRIVATE) +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class SubsidiesCreateResult implements Serializable { + private static final long serialVersionUID = 5008480977464421822L; + + /** + *
+ * 字段名:二级商户号 + * 变量名:sub_mchid + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补差的电商平台二级商户,填写微信支付分配的商户号。 + * 示例值:1900000109 + *+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + + /** + *
+ * 字段名:微信订单号 + * 变量名:transaction_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信支付订单号。 + * 示例值: 4208450740201411110007820472 + *+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+ * 字段名:微信补差单号 + * 变量名:subsidy_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信补差单号,微信支付系统返回的唯一标识。 + * 示例值: 3008450740201411110007820472 + *+ */ + @SerializedName(value = "subsidy_id") + private String subsidyId; + + /** + *
+ * 字段名:补差描述 + * 变量名:description + * 是否必填:是 + * 类型:string(80) + * 描述: + * 补差备注描述,查询的时候原样带回。 + * 示例值:测试备注 + *+ */ + @SerializedName(value = "description") + private String description; + + /** + *
+ * 字段名:补差金额 + * 变量名:amount + * 是否必填:是 + * 类型:int64 + * 描述: + * 补差金额,单位为分,只能为整数,不能超过下单时候的最大补差金额。 + * 注意:单笔订单最高补差金额为10000元 + * 示例值:10 + *+ */ + @SerializedName(value = "amount") + private Integer amount; + + /** + *
+ * 字段名:补差单结果 + * 变量名:result + * 是否必填:是 + * 类型:string(16) + * 描述: + * 补差单状态,枚举值: + * SUCCESS:补差成功 + * FAIL:补差失败 + * REFUND:已全额回退 + * 示例值:SUCCESS + *+ */ + @SerializedName(value = "result") + private String result; + + /** + *
+ * 字段名:补差完成时间 + * 变量名:success_time + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补贴完成时间,遵循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+08:00表示,北京时间2015年5月20日13点29分35秒。 + * 示例值: 2015-05-20T13:29:35.120+08:00 + *+ */ + @SerializedName(value = "success_time") + private String successTime; + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnRequest.java new file mode 100644 index 000000000..257d7abe4 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnRequest.java @@ -0,0 +1,105 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * add by 306932545@qq.com + * 请求补差回退API-请求对象 + *
+ * https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_2.shtml + *+ */ +@Data +@NoArgsConstructor +public class SubsidiesReturnRequest implements Serializable { + + /** + *
+ * 字段名:二级商户号 + * 变量名:sub_mchid + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补差的电商平台二级商户,填写微信支付分配的商户号。 + * 示例值:1900000109 + *+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + /** + *
+ * 字段名:微信订单号 + * 变量名:transaction_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信支付订单号。 + * 示例值: 4208450740201411110007820472 + *+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+ * 字段名:商户补差回退单号 + * 变量名:out_order_no + * 是否必填:是 + * 类型:string(64) + * 描述: + * 原发起补差请求时使用的商户系统内部的补差单号。 + * 示例值:P20150806125346 + *+ */ + @SerializedName(value = "out_order_no") + private String outOrderNo; + + /** + *
+ * 字段名:补差金额 + * 变量名:amount + * 是否必填:是 + * 类型:int64 + * 描述: + * 补差金额,单位为分,只能为整数,不能超过下单时候的最大补差金额。 + * 注意:单笔订单最高补差金额为10000元 + * 示例值:10 + *+ */ + @SerializedName(value = "amount") + private Integer amount; + + /** + *
+ * 字段名:补差描述 + * 变量名:description + * 是否必填:是 + * 类型:string(80) + * 描述: + * 补差备注描述,查询的时候原样带回。 + * 示例值:测试备注 + *+ */ + @SerializedName(value = "description") + private String description; + + /** + *
+ * 字段名:微信退款单号 + * 变量名:refund_id + * 是否必填:否 + * 类型:string(64) + * 描述: + * 微信退款单号,微信支付系统退款返回的唯一标识。 + * 用户零钱账户异常,无法在线发起退款时,此字段可以不传;其他情况下必传。 + * 示例值:3008450740201411110007820472 + *+ */ + @SerializedName(value = "refund_id") + private String refundId; +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnResult.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnResult.java new file mode 100644 index 000000000..fc319a016 --- /dev/null +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SubsidiesReturnResult.java @@ -0,0 +1,155 @@ +package com.github.binarywang.wxpay.bean.ecommerce; + +import com.google.gson.annotations.SerializedName; +import lombok.*; + +import java.io.Serializable; + +/** + * add by 306932545@qq.com + * 请求补差返回对象 + *
+ * https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_2.shtml + *+ */ +@Data +@Builder +@ToString +@NoArgsConstructor(access = AccessLevel.PRIVATE) +@AllArgsConstructor(access = AccessLevel.PRIVATE) +public class SubsidiesReturnResult implements Serializable { + private static final long serialVersionUID = 5008480977464421822L; + + /** + *
+ * 字段名:二级商户号 + * 变量名:sub_mchid + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补差的电商平台二级商户,填写微信支付分配的商户号。 + * 示例值:1900000109 + *+ */ + @SerializedName(value = "sub_mchid") + private String subMchid; + + + /** + *
+ * 字段名:微信订单号 + * 变量名:transaction_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信支付订单号。 + * 示例值: 4208450740201411110007820472 + *+ */ + @SerializedName(value = "transaction_id") + private String transactionId; + + /** + *
+ * 字段名:微信补差单号 + * 变量名:subsidy_refund_id + * 是否必填:是 + * 类型:string(64) + * 描述: + * 微信补差单号,微信支付系统返回的唯一标识。 + * 示例值: 3008450740201411110007820472 + *+ */ + @SerializedName(value = "subsidy_refund_id") + private String subsidyRefundId; + + /** + *
+ * 字段名:微信退款单号 + * 变量名:refund_id + * 是否必填:否 + * 类型:string(64) + * 描述: + * 微信退款单号,微信支付系统退款返回的唯一标识。 + * 示例值: 3008450740201411110007820472 + *+ */ + @SerializedName(value = "refund_id") + private String refundId; + + /** + *
+ * 字段名:商户补差回退单号 + * 变量名:out_order_no + * 是否必填:是 + * 类型:string(64) + * 描述: + * 商户系统内部的补差回退单号,在商户系统内部唯一,只能是数字、大小写字母_-|*@ ,同一补差回退单号多次请求等同一次。 + * 示例值:P20150806125346 + *+ */ + @SerializedName(value = "out_order_no") + private String outOrderNo; + + /** + *
+ * 字段名:补差描述 + * 变量名:description + * 是否必填:是 + * 类型:string(80) + * 描述: + * 补差备注描述,查询的时候原样带回。 + * 示例值:测试备注 + *+ */ + @SerializedName(value = "description") + private String description; + + /** + *
+ * 字段名:补差金额 + * 变量名:amount + * 是否必填:是 + * 类型:int64 + * 描述: + * 补差金额,单位为分,只能为整数,不能超过下单时候的最大补差金额。 + * 注意:单笔订单最高补差金额为10000元 + * 示例值:10 + *+ */ + @SerializedName(value = "amount") + private Integer amount; + + /** + *
+ * 字段名:补差单结果 + * 变量名:result + * 是否必填:是 + * 类型:string(16) + * 描述: + * 补差单状态,枚举值: + * SUCCESS:补差成功 + * FAIL:补差失败 + * REFUND:已全额回退 + * 示例值:SUCCESS + *+ */ + @SerializedName(value = "result") + private String result; + + /** + *
+ * 字段名:补差完成时间 + * 变量名:success_time + * 是否必填:是 + * 类型:string(32) + * 描述: + * 补贴完成时间,遵循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+08:00表示,北京时间2015年5月20日13点29分35秒。 + * 示例值: 2015-05-20T13:29:35.120+08:00 + *+ */ + @SerializedName(value = "success_time") + private String successTime; + + +} diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java index 5b2a8beae..ca1cfb66b 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/EcommerceService.java @@ -498,4 +498,41 @@ public interface EcommerceService { */ InputStream downloadBill(String url) throws WxPayException; + + /** + *
+ * 请求补差API + * 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_1.shtml + *+ * + * @param subsidiesCreateRequest 请求补差。 + * @return 返回数据 return SubsidiesCreateResult + * @throws WxPayException the wx pay exception + */ + SubsidiesCreateResult subsidiesCreate(SubsidiesCreateRequest subsidiesCreateRequest) throws WxPayException; + + /** + *
+ * 请求补差回退API + * 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_2.shtml + *+ * + * @param subsidiesReturnRequest 请求补差。 + * @return 返回数据 return SubsidiesReturnResult + * @throws WxPayException the wx pay exception + */ + SubsidiesReturnResult subsidiesReturn(SubsidiesReturnRequest subsidiesReturnRequest) throws WxPayException; + + /** + *
+ * 取消补差API + * 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter7_5_3.shtml + *+ * + * @param subsidiesCancelRequest 请求补差。 + * @return 返回数据 return SubsidiesCancelResult + * @throws WxPayException the wx pay exception + */ + SubsidiesCancelResult subsidiesCancel(SubsidiesCancelRequest subsidiesCancelRequest) throws WxPayException; + } diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java index 3d9a1af62..edd2a2f4a 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/EcommerceServiceImpl.java @@ -374,6 +374,27 @@ public class EcommerceServiceImpl implements EcommerceService { return this.payService.downloadV3(url); } + @Override + public SubsidiesCreateResult subsidiesCreate(SubsidiesCreateRequest subsidiesCreateRequest) throws WxPayException{ + String url = String.format("%s/v3/ecommerce/subsidies/create", this.payService.getPayBaseUrl()); + String response = this.payService.postV3(url, GSON.toJson(subsidiesCreateRequest)); + return GSON.fromJson(response, SubsidiesCreateResult.class); + } + + @Override + public SubsidiesReturnResult subsidiesReturn(SubsidiesReturnRequest subsidiesReturnRequest) throws WxPayException{ + String url = String.format("%s/v3/ecommerce/subsidies/return", this.payService.getPayBaseUrl()); + String response = this.payService.postV3(url, GSON.toJson(subsidiesReturnRequest)); + return GSON.fromJson(response, SubsidiesReturnResult.class); + } + + + @Override + public SubsidiesCancelResult subsidiesCancel(SubsidiesCancelRequest subsidiesCancelRequest) throws WxPayException{ + String url = String.format("%s/v3/ecommerce/subsidies/cancel", this.payService.getPayBaseUrl()); + String response = this.payService.postV3(url, GSON.toJson(subsidiesCancelRequest)); + return GSON.fromJson(response, SubsidiesCancelResult.class); + } /** * 校验通知签名 *