diff --git a/plugins/alipay_cpn/internal/util.go b/plugins/alipay_cpn/internal/util.go index 743f457..a59e02f 100644 --- a/plugins/alipay_cpn/internal/util.go +++ b/plugins/alipay_cpn/internal/util.go @@ -24,6 +24,9 @@ func req(config *Config, req *po.Param) (url.Values, error) { if kv.Key == "sign" { continue } + if kv.Value == "" { + continue + } uv.Set(kv.Key, kv.Value) strToBeSigned.WriteString(fmt.Sprintf("%s=%s&", kv.Key, kv.Value)) } @@ -68,6 +71,9 @@ func Verify(n *po.Notify, publicKeyPEM string) (bool, error) { if kv.Key == "sign_type" { continue } + if kv.Value == "" { + continue + } uv.Set(kv.Key, kv.Value) strToBeSigned.WriteString(fmt.Sprintf("%s=%s&", kv.Key, kv.Value)) }