SDK 版本:github.com/wechatpay-apiv3/wechatpay-go v0.2.11
golang 使用 wechatpay-apiv3 初始化客户端时报错 init client setting err:decrypt downloaded certificate failed: cipher: message authentication failed
场景是这样的:我在微信后台添加 api v3的 密钥,然后去获取密钥,报这个错:init client setting err:decrypt downloaded certificate failed: cipher: message authentication failed
因为当时加的密钥就保存好了的,所以密钥是肯定正确的。最后通过这个 issue 发现是 api v3的密钥有问题。(https://github.com/wechatpay-apiv3/wechatpay-go/issues/135)
重置密钥之后解决。没想到第一次添加的密钥会有问题,需要重置一次才能正常使用,这应该是微信的一个 BUG。
转载请注明:MitNick » golang 使用 wechatpay-apiv3 初始化客户端时报错”init client setting err:decrypt downloaded certificate failed: cipher: message authentication failed”