|
|
@@ -200,14 +200,14 @@ public class WeChatPaymentMininProgramStrategyImpl implements PaymentStrategy {
|
|
|
// TODO: 请求成功,继续业务逻辑
|
|
|
log.info("微信预支付订单创建成功,预支付ID:{}", response.prepayId);
|
|
|
Map<String,String> result = new HashMap<>();
|
|
|
+ response.prepayId = "prepay_id="+response.prepayId;
|
|
|
result.put("prepayId", response.prepayId);
|
|
|
result.put("appId", appId);
|
|
|
result.put("mchId", mchId);
|
|
|
result.put("orderNo", request.outTradeNo);
|
|
|
long timestamp = System.currentTimeMillis() / 1000; // 时间戳
|
|
|
String nonce = WXPayUtility.createNonce(32); // 随机字符串
|
|
|
- String prepayId = response.prepayId;
|
|
|
- String message = String.format("%s\n%s\n%s\n%s\n", appId, timestamp, nonce, prepayId);
|
|
|
+ String message = String.format("%s\n%s\n%s\n%s\n", appId, timestamp, nonce, response.prepayId);
|
|
|
// String sign = WXPayUtility.sign(message, sha256withRSA, privateKey);
|
|
|
|
|
|
Signature sign = Signature.getInstance("SHA256withRSA");
|