Commit cfc96c9c by Little Write Committed by GitHub

Update controller/topup_creem.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
parent 12ea0c19
......@@ -36,8 +36,11 @@ func generateCreemSignature(payload string, secret string) string {
// 验证Creem webhook签名
func verifyCreemSignature(payload string, signature string, secret string) bool {
if secret == "" {
log.Printf("Creem webhook secret未配置,跳过签名验证")
return true // 如果没有配置secret,跳过验证
if setting.CreemTestMode {
log.Printf("Creem webhook secret未配置,测试模式下跳过签名验证")
return true
}
return false
}
expectedSignature := generateCreemSignature(payload, secret)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment