|
|
@ -25,9 +25,12 @@ func VerifyByBooking(dbname, site_id string, data map[string]string, url ...stri |
|
|
|
if len(url) > 0 && url[0] != "" { |
|
|
|
order_rpc_url = url[0] |
|
|
|
} |
|
|
|
|
|
|
|
var res_arr OrderVerifyRes |
|
|
|
|
|
|
|
conn, _, err := DialOrderService("tcp", order_rpc_url) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
return res_arr, err |
|
|
|
} |
|
|
|
defer conn.Close() |
|
|
|
|
|
|
@ -36,7 +39,7 @@ func VerifyByBooking(dbname, site_id string, data map[string]string, url ...stri |
|
|
|
|
|
|
|
data_json, err := json.Marshal(data) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
return res_arr, err |
|
|
|
} |
|
|
|
|
|
|
|
encryData := crypter.DesEn(string(data_json), DES_KEY) |
|
|
@ -58,21 +61,19 @@ func VerifyByBooking(dbname, site_id string, data map[string]string, url ...stri |
|
|
|
err = conn.VerifyByBooking(req, res) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
return res_arr, err |
|
|
|
} |
|
|
|
|
|
|
|
res_data_de, err := GetOrgData(res) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
return res_arr, err |
|
|
|
} |
|
|
|
|
|
|
|
var res_arr OrderVerifyRes |
|
|
|
|
|
|
|
err = json.Unmarshal([]byte(res_data_de), &res_arr) |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
return res_arr, err |
|
|
|
} |
|
|
|
|
|
|
|
return res_arr, nil |
|
|
|