Skip to content

Commit 373ab8f

Browse files
committed
#726 微信支付修复发送现金红包接口签名错误的问题
1 parent 3f94ec3 commit 373ab8f

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPaySendRedpackRequest.java

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
package com.github.binarywang.wxpay.bean.request;
22

33
import com.thoughtworks.xstream.annotations.XStreamAlias;
4-
import lombok.*;
4+
import lombok.AllArgsConstructor;
5+
import lombok.Builder;
6+
import lombok.Data;
7+
import lombok.EqualsAndHashCode;
8+
import lombok.NoArgsConstructor;
59

610
/**
7-
* 发送红包请求参数对象
11+
* 发送红包请求参数对象.
812
* Created by Binary Wang on 2016/9/24.
913
*
1014
* @author <a href="https://github.com/binarywang">Binary Wang</a>
@@ -16,30 +20,36 @@
1620
@AllArgsConstructor
1721
@XStreamAlias("xml")
1822
public class WxPaySendRedpackRequest extends BaseWxPayRequest {
23+
@Override
24+
protected boolean ignoreSignType() {
25+
return true;
26+
}
27+
1928
/**
20-
* mch_billno
21-
* 商户订单号(每个订单号必须唯一) 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。
29+
* mch_billno.
30+
* 商户订单号(每个订单号必须唯一)
31+
* 组成:mch_id+yyyymmdd+10位一天内不能重复的数字。 接口根据商户订单号支持重入,如出现超时可再调用。
2232
*/
2333
@XStreamAlias("mch_billno")
2434
private String mchBillNo;
2535

2636
/**
27-
* send_name
37+
* send_name.
2838
* 商户名称
2939
* 红包发送者名称
3040
*/
3141
@XStreamAlias("send_name")
3242
private String sendName;
3343

3444
/**
35-
* re_openid
45+
* re_openid.
3646
* 接受红包的用户 用户在wxappid下的openid
3747
*/
3848
@XStreamAlias("re_openid")
3949
private String reOpenid;
4050

4151
/**
42-
* total_amount
52+
* total_amount.
4353
* 红包总额
4454
*/
4555
@XStreamAlias("total_amount")
@@ -53,7 +63,7 @@ public class WxPaySendRedpackRequest extends BaseWxPayRequest {
5363
private Integer totalNum;
5464

5565
/**
56-
* amt_type
66+
* amt_type.
5767
* 红包金额设置方式
5868
* ALL_RAND—全部随机,商户指定总金额和红包发放总人数,由微信支付随机计算出各红包金额
5969
* 裂变红包必填
@@ -62,44 +72,44 @@ public class WxPaySendRedpackRequest extends BaseWxPayRequest {
6272
private String amtType;
6373

6474
/**
65-
* wishing
75+
* wishing.
6676
* 红包祝福语
6777
*/
6878
@XStreamAlias("wishing")
6979
private String wishing;
7080

7181
/**
72-
* client_ip
82+
* client_ip.
7383
* 服务器Ip地址
7484
* 调用接口的机器Ip地址
7585
*/
7686
@XStreamAlias("client_ip")
7787
private String clientIp;
7888

7989
/**
80-
* act_name
90+
* act_name.
8191
* 活动名称
8292
*/
8393
@XStreamAlias("act_name")
8494
private String actName;
8595

8696
/**
87-
* remark
97+
* remark.
8898
* 备注
8999
*/
90100
@XStreamAlias("remark")
91101
private String remark;
92102

93103
/**
94-
* wxappid
104+
* wxappid.
95105
* 微信分配的公众账号ID(企业号corpid即为此appId)。接口传入的所有appid应该为公众号的appid(在mp.weixin.qq.com申请的),不能为APP的appid(在open.weixin.qq.com申请的)
96106
*/
97107
@XStreamAlias("wxappid")
98108
private String wxAppid;
99109

100110
/**
101111
* <pre>
102-
* scene_id
112+
* scene_id.
103113
* 场景id
104114
* PRODUCT_1:商品促销
105115
* PRODUCT_2:抽奖
@@ -117,7 +127,7 @@ public class WxPaySendRedpackRequest extends BaseWxPayRequest {
117127

118128
/**
119129
* <pre>
120-
* risk_info
130+
* risk_info.
121131
* 活动信息
122132
* posttime:用户操作的时间戳
123133
* mobile:业务系统账号的手机号,国家代码-手机号。不需要+号
@@ -133,7 +143,7 @@ public class WxPaySendRedpackRequest extends BaseWxPayRequest {
133143

134144
/**
135145
* <pre>
136-
* consume_mch_id
146+
* consume_mch_id.
137147
* 资金授权商户号
138148
* 资金授权商户号
139149
* 服务商替特约商户发放时使用

0 commit comments

Comments
 (0)