From 8012154ec9dff6e0a3f116f99a2782badfd52dcd Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Sat, 22 Feb 2020 21:48:31 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20#1405=20=E5=BE=AE=E4=BF=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=88=9B=E5=BB=BA=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=B8=AD=E4=BA=A4=E6=98=93=E7=B1=BB=E5=9E=8B=E4=B8=BAJSAPI?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E7=AD=BE=E5=90=8D=E6=96=B9=E6=B3=95=E4=B8=8D?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=B8=BAMD5=EF=BC=8C=E4=BB=8E=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=AF=B9=E8=B1=A1=E4=B8=AD=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java index c0782f90..61dcee09 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java @@ -322,7 +322,11 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { } case TradeType.JSAPI: { - String signType = SignType.MD5; + String signType = request.getSignType(); + if (signType == null) { + signType = SignType.MD5; + } + String appid = unifiedOrderResult.getAppid(); if (StringUtils.isNotEmpty(unifiedOrderResult.getSubAppId())) { appid = unifiedOrderResult.getSubAppId();