Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

退款通知回调 #247

Closed
chenhl05 opened this issue Jan 22, 2025 · 0 comments
Closed

退款通知回调 #247

chenhl05 opened this issue Jan 22, 2025 · 0 comments
Assignees

Comments

@chenhl05
Copy link

  • Go 版本:1.23.3
  • wechatpay-go 版本:v0.2.20

退款通知回调处理:

certificateVisitor := downloader.MgrInstance().GetCertificateVisitor(cfg.MchId)
handler, err := notify.NewRSANotifyHandler(cfg.ApiKey, verifiers.NewSHA256WithRSAVerifier(certificateVisitor))
if err != nil {
	log.Errorf("WxPayRefundCallback NewRSANotifyHandler error: %v", err)
}

refund := make(map[string]interface{})

notifyReq, err := handler.ParseNotifyRequest(ctx, c.Request, &refund)

if err != nil {
	log.Errorf("WxPayRefundCallback ParseNotifyRequest: %v", err.Error())
}

输出结果:
在执行 handler.ParseNotifyRequest(ctx, c.Request, &refund) 时,提示错误:AEAD_AES_256_GCM decrypt error: cipher: message authentication failed

我使用的商户号和证书,是和支付回调通知相同的,支付回调通知是能正常解析

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants