From 3c094cf201bee68ce81702ceaead2f52312baadd Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Mon, 25 Sep 2023 17:06:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/pay/internal/logic/stripewebhooklogic.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/pay/internal/logic/stripewebhooklogic.go b/server/pay/internal/logic/stripewebhooklogic.go index 70fe699c..cc8a954f 100644 --- a/server/pay/internal/logic/stripewebhooklogic.go +++ b/server/pay/internal/logic/stripewebhooklogic.go @@ -57,12 +57,15 @@ func (l *StripeWebhookLogic) StripeWebhook(req *types.StripeWebhookReq, userinfo logc.Errorf(l.ctx, "StripeWebhookLogic StripeWebhook Unmarshal err:%v", err) return resp.SetStatusWithMessage(basic.CodeAesCbcDecryptionErr, "pay notify Unmarshal fail") } + // fmt.Println(req) + // fmt.Println(event) endpointSecret := l.svcCtx.Config.PayConfig.Stripe.EndpointSecret signatureHeader := req.StripeSignature + fmt.Println(endpointSecret) event, err := webhook.ConstructEvent(req.Payload, signatureHeader, endpointSecret) if err != nil { - logx.Error(err) + logc.Errorf(l.ctx, "webhook.ConstructEvent err:%v", err) return resp.SetStatusWithMessage(basic.CodeAesCbcDecryptionErr, "Webhook signature verification failed") }