🐛 #1405 微信支付创建订单接口中交易类型为JSAPI时的签名方法不默认为MD5,从请求对象中获取

This commit is contained in:
Binary Wang
2020-02-22 21:48:31 +08:00
parent 3ccc2786c5
commit 8012154ec9

View File

@@ -322,7 +322,11 @@ public abstract class BaseWxPayServiceImpl implements WxPayService {
} }
case TradeType.JSAPI: { case TradeType.JSAPI: {
String signType = SignType.MD5; String signType = request.getSignType();
if (signType == null) {
signType = SignType.MD5;
}
String appid = unifiedOrderResult.getAppid(); String appid = unifiedOrderResult.getAppid();
if (StringUtils.isNotEmpty(unifiedOrderResult.getSubAppId())) { if (StringUtils.isNotEmpty(unifiedOrderResult.getSubAppId())) {
appid = unifiedOrderResult.getSubAppId(); appid = unifiedOrderResult.getSubAppId();