- business msg added to error

This commit is contained in:
gazebo
2018-06-20 07:34:11 +08:00
parent 6fc94315f4
commit 7785ef6485
5 changed files with 6 additions and 2 deletions

View File

@@ -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,