Update controller/topup_creem.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Little Write
2025-09-27 11:40:19 +08:00
committed by GitHub
parent 12ea0c19e6
commit cfc96c9c93
+5 -2
View File
@@ -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)