- 为什么优惠费率活动报名对外Api的更新单据信息接口报验签失败?
【修改单据信息】|应用场景该接口只适用于修改已经审核失败的单据。 |接口说明适用对象:从业机构 请求地址:https://api.mch.weixin.qq.com/v3/rate-activity/applications/id/{application_id} 请求方式:PATCH 接口规则:https://wechatpay-api.gitbook.io/wechatpay-api-v3 [图片] 这个字段我传的中文,报验签失败,改成英文之后就能验签通过,但是报名提交的时候也是有中文,那个就没事儿,能帮忙解答一下原因吗,这个地方需要注意什么 [图片] [图片] 能帮忙解答一下吗
2021-07-06 - ApiV3 接口调用code返回NOT_FOUND时,说明验签通过了吗?
"weChatResult":"{\"code\":\"NOT_FOUND\",\"message\":\"单据不存在\",\"responseCode\":\"404\",\"errorMsg\":\"{\\\"code\\\":\\\"NOT_FOUND\\\",\\\"message\\\":\\\"单据不存在\\\"}\"
2021-07-06 - apiv3接口报签名验证失败?
【修改单据信息】|应用场景该接口只适用于修改已经审核失败的单据。 |接口说明适用对象:从业机构 请求地址:https://api.mch.weixin.qq.com/v3/rate-activity/applications/id/{application_id} 请求方式:PATCH 接口规则:https://wechatpay-api.gitbook.io/wechatpay-api-v3 @Override public WechatActivityResult updateDocumentInformation(UpdateDocumentInformationParamDTO updateDocumentInformationParamDTO) { CloseableHttpClient build = null; CloseableHttpResponse execute = null; try { logger.info("修改单据信息开始", updateDocumentInformationParamDTO); String url; if (null == updateDocumentInformationParamDTO.getApplication_id()) { return new WechatActivityResult(WechatActivityResultEnum.MISSING_PARAMTER.getCode(), WechatActivityResultEnum.MISSING_PARAMTER.getMessage()); } url = wechatQueryUrl + updateDocumentInformationParamDTO.getApplication_id(); JSONObject param = new JSONObject(); if (null != updateDocumentInformationParamDTO.getActivity_detail_modification()) { param.put("activity_detail_modification", updateDocumentInformationParamDTO.getActivity_detail_modification()); } if (null != updateDocumentInformationParamDTO.getAdditional_information()) { param.put("additional_information", updateDocumentInformationParamDTO.getAdditional_information()); } String paramStr = param.toJSONString(); String token = WeChatBaseUtil.getToken(paramStr, url, "PATCH", rsaPrivateKey, mchId, mchPrivateSerialNo); url=baseUrl+url; HttpPatch httpPatch = new HttpPatch(url); httpPatch.addHeader("Charsert", "UTF-8"); httpPatch.addHeader("Accept", "application/json"); httpPatch.addHeader("Content-Type", "application/json"); httpPatch.addHeader("Authorization", "WECHATPAY2-SHA256-RSA2048 " + token); httpPatch.addHeader("Wechatpay-Serial", WechantSerial); StringEntity stringEntity = new StringEntity(paramStr); httpPatch.setEntity(stringEntity); HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); build = httpClientBuilder.build(); execute = build.execute(httpPatch); String result = EntityUtils.toString(execute.getEntity()); logger.info("修改单据信息成功"); return new WechatActivityResult(WechatActivityResultEnum.SUCCESS.getCode(), WechatActivityResultEnum.SUCCESS.getMessage(), result); } catch (Exception e) { logger.error("系统异常", e); return new WechatActivityResult(WechatActivityResultEnum.SYSTEM_EXCEPTION.getCode(), WechatActivityResultEnum.SYSTEM_EXCEPTION.getMessage()); } finally { closeStream(build, execute); } b报签名验证失败,麻烦帮忙看一下哪里有问题
2021-07-05