Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在支付结果通知类WxPayOrderNotifyResult中添加了checkResult方法 #828

Merged
merged 1 commit into from
Nov 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,25 @@ public class WxPayOrderNotifyResult extends BaseWxPayResult {
*/
@XStreamAlias("version")
private String version;


/**
* 校验返回结果签名.
*
* @param wxPayService the wx pay service
* @param signType 签名类型
* @param checkSuccess 是否同时检查结果是否成功
* @throws WxPayException the wx pay exception
*/
@Override
public void checkResult(WxPayService wxPayService, String signType, boolean checkSuccess) throws WxPayException {
//防止伪造成功通知
if ("SUCCESS".equals(getReturnCode()) && getSign() == null) {
throw new WxPayException("伪造的通知!");
}

super.checkResult(wxPayService, signType, checkSuccess);
}

/**
* From xml wx pay order notify result.
*
Expand Down