- business msg added to error
This commit is contained in:
@@ -42,10 +42,12 @@ func (m *MTPSAPI) CheckRequestValidation(request *http.Request) (callbackRespons
|
||||
request.ParseForm()
|
||||
sign := m.signParams(request.PostForm)
|
||||
if sign != request.FormValue(signKey) {
|
||||
m.sugarLogger.Infof("Signature is not ok, mine:%v, get:%v", sign, request.FormValue(signKey))
|
||||
return SignatureIsNotOk
|
||||
}
|
||||
|
||||
for _, valueKey := range []string{"delivery_id", "mt_peisong_id", "order_id"} {
|
||||
m.sugarLogger.Errorf("Missing mandatory param:%v", valueKey)
|
||||
if request.FormValue(valueKey) == "" {
|
||||
return &MtpsCallbackResponse{
|
||||
Code: -1,
|
||||
|
||||
Reference in New Issue
Block a user