@@ -342,7 +342,7 @@ public <T> T createOrder(WxPayUnifiedOrderRequest request) throws WxPayException
342
342
configMap .put ("appid" , appId );
343
343
344
344
final WxPayAppOrderResult result = WxPayAppOrderResult .builder ()
345
- .sign (SignUtils .createSign (configMap , null , this .getConfig ().getMchKey (), null ))
345
+ .sign (SignUtils .createSign (configMap , request . getSignType () , this .getConfig ().getMchKey (), null ))
346
346
.prepayId (prepayId )
347
347
.partnerId (partnerId )
348
348
.appId (appId )
@@ -419,7 +419,7 @@ public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws W
419
419
configMap .put ("noncestr" , nonceStr );
420
420
configMap .put ("appid" , appId );
421
421
// 此map用于客户端与微信服务器交互
422
- payInfo .put ("sign" , SignUtils .createSign (configMap , null , this .getConfig ().getMchKey (), null ));
422
+ payInfo .put ("sign" , SignUtils .createSign (configMap , request . getSignType () , this .getConfig ().getMchKey (), null ));
423
423
payInfo .put ("prepayId" , prepayId );
424
424
payInfo .put ("partnerId" , partnerId );
425
425
payInfo .put ("appId" , appId );
@@ -432,8 +432,8 @@ public Map<String, String> getPayInfo(WxPayUnifiedOrderRequest request) throws W
432
432
payInfo .put ("timeStamp" , timestamp );
433
433
payInfo .put ("nonceStr" , nonceStr );
434
434
payInfo .put ("package" , "prepay_id=" + prepayId );
435
- payInfo .put ("signType" , SignType . MD5 );
436
- payInfo .put ("paySign" , SignUtils .createSign (payInfo , null , this .getConfig ().getMchKey (), null ));
435
+ payInfo .put ("signType" , request . getSignType () );
436
+ payInfo .put ("paySign" , SignUtils .createSign (payInfo , request . getSignType () , this .getConfig ().getMchKey (), null ));
437
437
}
438
438
439
439
return payInfo ;
@@ -457,7 +457,7 @@ public String createScanPayQrcodeMode1(String productId) {
457
457
params .put ("time_stamp" , String .valueOf (System .currentTimeMillis () / 1000 ));
458
458
params .put ("nonce_str" , String .valueOf (System .currentTimeMillis ()));
459
459
460
- String sign = SignUtils .createSign (params , null , this .getConfig ().getMchKey (), null );
460
+ String sign = SignUtils .createSign (params , SignType . MD5 , this .getConfig ().getMchKey (), null );
461
461
params .put ("sign" , sign );
462
462
463
463
for (String key : params .keySet ()) {
0 commit comments