- don't present app secret when access ebai api
This commit is contained in:
@@ -55,7 +55,6 @@ func (a *API) Err2CallbackResponse(cmd string, err error, data interface{}) *Cal
|
||||
"ticket": []string{response.Ticket},
|
||||
"source": []string{response.Source},
|
||||
"body": []string{string(utils.MustMarshal(response.Body))},
|
||||
secretKey: []string{a.secret},
|
||||
"encrypt": []string{""},
|
||||
}
|
||||
response.Sign = a.signParams(params)
|
||||
@@ -75,7 +74,6 @@ func (a *API) CheckCallbackValidation(request *http.Request) (callbackResponse *
|
||||
for k, v := range request.PostForm {
|
||||
params[k] = v
|
||||
}
|
||||
params[secretKey] = []string{a.secret}
|
||||
sign := a.signParams(params)
|
||||
if sign != request.FormValue(signKey) {
|
||||
msg := fmt.Sprintf("Signature is not ok, mine:%v, get:%v", sign, request.FormValue(signKey))
|
||||
|
||||
Reference in New Issue
Block a user