fix:支付
This commit is contained in:
parent
5be1edfa71
commit
3c094cf201
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user