Map<String, String> resp = wxpay.unifiedOrder(data);
logger.info("-------------------下单结果-------------------------");
for(Map.Entry<String,String> entry : resp.entrySet()){
logger.info(entry.getKey() + "---->" + entry.getValue());
}
Map<String, String> packageParams = new HashMap<>();
packageParams.put("appId", config.getAppID().trim());
packageParams.put("timeStamp", (WxUtil.getCurrentTimestamp() + "").trim());
packageParams.put("nonceStr", WXPayUtil.generateNonceStr().trim());
packageParams.put("package", "prepay_id=" + resp.get("prepay_id").trim());
packageParams.put("signType", WXPayConstants.MD5.trim());
logger.info("******************二次签名******************");
String packageSign = WXPayUtil.generateSignature(packageParams,config.getKey().trim());
logger.info(packageSign);
logger.info("----------------------------------------------------------------");
packageParams.put("paySign", packageSign);
for(Map.Entry<String,String> entry : packageParams.entrySet()){
logger.info(entry.getKey() + "---->" + entry.getValue());
}
return packageParams;
1签名有问题。八成是 那个秘钥有问题,好好调试一下.