-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 将原有请求模型类中一些基础数据类型改为对应的包装类,因为在用户没有显式set的情况下,这些基础数据类型序列化为json时也会以默认值的形式作为参数传到微信端,造成微信端返回错误。 2. 微信支付分相关的回调数据处理方法加上签名验证。 3. 增加方法授权/解除授权服务回调数据处理
- Loading branch information
1 parent
8bd95bc
commit 7eb11c8
Showing
6 changed files
with
224 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
138 changes: 138 additions & 0 deletions
138
...n/java/com/github/binarywang/wxpay/bean/payscore/UserAuthorizationStatusNotifyResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
package com.github.binarywang.wxpay.bean.payscore; | ||
|
||
import java.io.Serializable; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
|
||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
/** | ||
* 授权/解除授权服务回调通知结果 | ||
* <pre> | ||
* 文档地址:https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/payscore/chapter4_4.shtml | ||
* </pre> | ||
*/ | ||
@Data | ||
@NoArgsConstructor | ||
public class UserAuthorizationStatusNotifyResult implements Serializable { | ||
|
||
/** | ||
* 源数据 | ||
*/ | ||
private PayScoreNotifyData rawData; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:公众账号ID | ||
* 变量名:appid | ||
* 是否必填:是 | ||
* 类型:string[1,32] | ||
* 描述: | ||
* 调用授权服务接口提交的公众账号ID。 | ||
* 示例值:wxd678efh567hg6787 | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "appid") | ||
private String appid; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:商户号 | ||
* 变量名:mchid | ||
* 是否必填:是 | ||
* 类型:string[1,32] | ||
* 描述: | ||
* 调用授权服务接口提交的商户号。 | ||
* 示例值:1230000109 | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "mchid") | ||
private String mchid; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:商户签约单号 | ||
* 变量名:out_request_no | ||
* 是否必填:否 | ||
* 类型: string[1,64] | ||
* 描述: | ||
* 调用授权服务接口提交的商户请求唯一标识(新签约的用户,且在授权签约中上传了该字段,则在解约授权回调通知中有返回)。 | ||
* 示例值:1234323JKHDFE1243252 | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "out_request_no") | ||
private String outRequestNo; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:服务ID | ||
* 变量名:service_id | ||
* 是否必填:是 | ||
* 类型: string[1,32] | ||
* 描述: | ||
* 调用授权服务接口提交的服务ID。 | ||
* 示例值:1234323JKHDFE1243252 | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "service_id") | ||
private String serviceId; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:用户标识 | ||
* 变量名:openid | ||
* 是否必填:是 | ||
* 类型: string[1,128] | ||
* 描述: | ||
* 微信用户在商户对应appid下的唯一标识。 | ||
* 示例值:oUpF8uMuAJO_M2pxb1Q9zNjWeS6o | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "openid") | ||
private String openid; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:回调状态 | ||
* 变量名:user_service_status | ||
* 是否必填:否 | ||
* 类型: string[1,32] | ||
* 描述: | ||
* 1、USER_OPEN_SERVICE:授权成功 | ||
* 2、USER_CLOSE_SERVICE:解除授权成功 | ||
* 示例值:USER_OPEN_SERVICE | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "user_service_status") | ||
private String userServiceStatus; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:服务授权/解除授权时间 | ||
* 变量名:openorclose_time | ||
* 是否必填:否 | ||
* 类型: string[1,32] | ||
* 描述: | ||
* 服务授权/解除授权成功时间。 | ||
* 示例值:20180225112233 | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "openorclose_time") | ||
private String openOrCloseTime; | ||
|
||
/** | ||
* <pre> | ||
* 字段名:授权协议号 | ||
* 变量名:authorization_code | ||
* 是否必填:否 | ||
* 类型: string[1,32] | ||
* 描述: | ||
* 授权协议号,预授权时返回,非预授权不返回 | ||
* 示例值:1275342195190894594 | ||
* </pre> | ||
*/ | ||
@SerializedName(value = "authorization_code") | ||
private String authorizationCode; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters