1
0
mirror of synced 2025-12-19 06:37:59 +08:00

🎨 #1572 微信支付调起支付时的nonceStr参数使用统一下单时的参数值

This commit is contained in:
Binary Wang
2020-05-21 21:25:30 +08:00
parent 11e81d8318
commit 69ac4ec4a7

View File

@@ -281,7 +281,7 @@ public abstract class BaseWxPayServiceImpl implements WxPayService {
} }
String timestamp = String.valueOf(System.currentTimeMillis() / 1000); String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
String nonceStr = String.valueOf(System.currentTimeMillis()); String nonceStr = unifiedOrderResult.getNonceStr();
switch (request.getTradeType()) { switch (request.getTradeType()) {
case TradeType.MWEB: { case TradeType.MWEB: {
return (T) new WxPayMwebOrderResult(unifiedOrderResult.getMwebUrl()); return (T) new WxPayMwebOrderResult(unifiedOrderResult.getMwebUrl());
@@ -387,7 +387,7 @@ public abstract class BaseWxPayServiceImpl implements WxPayService {
Map<String, String> payInfo = new HashMap<>(); Map<String, String> payInfo = new HashMap<>();
String timestamp = String.valueOf(System.currentTimeMillis() / 1000); String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
String nonceStr = String.valueOf(System.currentTimeMillis()); String nonceStr = unifiedOrderResult.getNonceStr();
if (TradeType.NATIVE.equals(request.getTradeType())) { if (TradeType.NATIVE.equals(request.getTradeType())) {
payInfo.put("codeUrl", unifiedOrderResult.getCodeURL()); payInfo.put("codeUrl", unifiedOrderResult.getCodeURL());
} else if (TradeType.APP.equals(request.getTradeType())) { } else if (TradeType.APP.equals(request.getTradeType())) {