您好,这个工具类怎么用呢?
小程序支付,第一次返回了prepay_id,结果应答的微信支付签名验证失败,再次提交订单订单号重?private CloseableHttpResponse executeWithSignature(HttpRoute route, HttpRequestWrapper request, HttpClientContext context, HttpExecutionAware execAware) throws IOException, HttpException { // 上传类不需要消耗两次故不做转换 if (!(request.getOriginal() instanceof WechatPayUploadHttpPost)) { convertToRepeatableRequestEntity(request); } // 添加认证信息 request.addHeader("Authorization", credentials.getSchema() + " " + credentials.getToken(request)); // 执行 CloseableHttpResponse response = mainExec.execute(route, request, context, execAware); // 对成功应答验签 StatusLine statusLine = response.getStatusLine(); if (statusLine.getStatusCode() >= 200 && statusLine.getStatusCode() < 300) { convertToRepeatableResponseEntity(response); if (!validator.validate(response)) { throw new HttpException("应答的微信支付签名验证失败"); } } return response; } 抛出:应答的微信支付签名验证失败,{"prepay_id":"wx23172422680548bac3a6955a0104660000"}已返回,但在提交提示订单重复
2022-05-31