Skip to content

Commit

Permalink
#1462 优化刷脸支付获取微信刷脸支付凭证的接口,保证请求到微信端时signType有值
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywang committed Mar 28, 2020
1 parent ef6e2dd commit a45a982
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.github.binarywang.wxpay.bean.request.*;
import com.github.binarywang.wxpay.bean.result.*;
import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.github.binarywang.wxpay.constant.WxPayConstants.SignType;
import com.github.binarywang.wxpay.constant.WxPayConstants.TradeType;
import com.github.binarywang.wxpay.exception.WxPayException;
Expand Down Expand Up @@ -804,6 +805,10 @@ public String queryComment(WxPayQueryCommentRequest request) throws WxPayExcepti

@Override
public WxPayFaceAuthInfoResult getWxPayFaceAuthInfo(WxPayFaceAuthInfoRequest request) throws WxPayException {
if (StringUtils.isEmpty(request.getSignType())) {
request.setSignType(WxPayConstants.SignType.MD5);
}

request.checkAndSign(this.getConfig());
String url = "https://payapp.weixin.qq.com/face/get_wxpayface_authinfo";
String responseContent = this.post(url, request.toXML(), false);
Expand Down

0 comments on commit a45a982

Please sign in to comment.