- 给员工下发企微群发任务报错,errcode=-1,errmsg=system error,如何解决?
https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token= 调用微信上面的接口,给员工下发一个群发任务,今天开始,接口一直返回错误,errcode = -1,errmsg=system error,微信文档说-1代表企微系统异常, 这个是微信的问题吗?如何解决? 下面是hint得结果: POST /cgi-bin/externalcontact/add_msg_template?access_token=J0gTE25TGLMEV3FrAIfWX_kOxUbK0n8wh61mRCHdLpQcxE_IKUbvZvM3r-2EC6eZAZpu5p6M96LZqvjIXwlxoSJ19SBA3sPPOvwTori0BimcSnPB46dI7ifJFo437EAKgjRmuSw_422jPqAWHsk-yPB-GXe37CgGlF_TwKXRiADPd3NYPReWU37ynE9bxlB9IANTPUpPeSs1j1l_r5VwcA&debug=1 HTTP/1.1 X-Forwarded-For: 114.253.100.51 PROXY_FORWARDED_FOR: 3364FD72,0000,0,0,0,0,0,0,0 WEWORK_PROXY_FORWARDED_FOR: 114.253.100.51 Connection: Keep-Alive Pragma: no-cache X-InnerReqId: 515750345.8833.1750331572.164918 Wxwork-Api-Transfer: ChkxNzUwMzMxNTcyNTE2NDEwNDY5MDAxMzkw X-W-Mod: wwopentransferlogic Host: qyapi.weixin.qq.com User-Agent: Apache-HttpClient/4.5.10 (Java/1.8.0_331) Content-Type: text/plain; charset=UTF-8 Content-Length: 815
06-19 - 调用API退款报错:For input string: "PUB",如何处理?
private void initWXPayService() { File file = new File(this.getClass().getResource("/").getPath()); String path = file.getPath(); RSAConfig config = new RSAConfig.Builder() .merchantId(Configure.getMch_id()) .merchantSerialNumber(Configure.getMerchantSerialNumber()) .privateKeyFromPath(path + "/wxpaycert/apiclient_key.pem") .wechatPayCertificatesFromPath( path + "/wxpaycert/apiclient_cert.pem", path + "/wxpaycert/apiclient_platform_cert.pem") .build(); service = new com.wechat.pay.java.service.refund.RefundService.Builder().config(config).build(); } CreateRequest requestRefund = new CreateRequest(); AmountReq amountReq = new AmountReq(); //订单总金额: 单位 分 amountReq.setTotal(totalPrice.multiply(new BigDecimal("100")).longValue()); //退款金额: 单位 分 amountReq.setRefund(refundPrice.multiply(new BigDecimal("100")).longValue()); //人民币 amountReq.setCurrency("CNY"); requestRefund.setAmount(amountReq); requestRefund.setOutTradeNo(outTradeNo); requestRefund.setOutRefundNo(outRefundNo); //发送退款请求:这里直接抛出异常: java.lang.NumberFormatException: For input string: "PUB" Refund refund = service.create(requestRefund);
05-29 - v3退款成功,但是返回时抛出异常:Validate response failed...
在调用微信退款接口(https://api.mch.weixin.qq.com/v3/refund/domestic/refunds)时,实际已经退款成功,但是在返回时报错: com.wechat.pay.java.core.exception.ValidationException: Validate response failed,the WechatPay signature is incorrect. Request-ID[08E1A3909C0610A50318D082DA4920928A0128B129-0]....... ] responseBody[{"amount":{"currency":"CNY","discount_refund":0,"from":[],"payer_refund":1,"payer_total":1,"refund":1,"refund_fee":0,"settlement_refund":1,"settlement_total":1,"total":1},"channel":"ORIGINAL","create_time":"2022-11-26T23:37:43+08:00","funds_account":"AVAILABLE","out_refund_no":"001","out_trade_no":"m2022112611312756292","promotion_detail":[],"refund_id":"50302403972022112627665373220","status":"SUCCESS","success_time":"2022-11-26T23:37:52+08:00","transaction_id":"4200001641202211260463256133","user_received_account":"邮储银行借记卡9693"}] at com.wechat.pay.java.core.http.AbstractHttpClient.validateResponse(AbstractHttpClient.java:70) 好像说的是微信验签失败了,但是请求已经是成功的呢,有没有大佬解释一下。(我用的是微信官方给的sdk-demo请求示例)
2022-11-28