收藏
回答

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请求示例)

回答关注问题邀请回答
收藏

1 个回答

  • Memory
    Memory
    2022-11-28

    参考这部分,注意验证签名使用的是平台证书

    2022-11-28
    有用 2
    回复
登录 后发表内容