//废单通知加密 public string discardcall_codemd5(discardcodecallbackmodel m) { string s = m.msg + m.password + m.serialNo + m.status + m.uid; string s_temp = EncryptionHelper.ToMD5ToLower(s, "UTF-8"); return(s_temp); }
public backRefund discardcodecallbacksend(discardcodecallbackmodel requestData, int agentcompanyid) { string url = "http://114.80.83.165/vst_passport/lvmamacallback/discardcodecallback.do"; #region 记入日志表 string reqip = CommonFunc.GetRealIP(); Lvmama_reqlog mlog = new Lvmama_reqlog { id = 0, reqstr = JsonConvert.SerializeObject(requestData), subtime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), respstr = "", resptime = "", code = "", describe = "", req_type = "discardcodecallback", sendip = reqip, stockagentcompanyid = agentcompanyid }; int logid = new lvmama_reqlogData().EditReqlog(mlog); mlog.id = logid; #endregion backRefund result = new backRefund { IsSuccess = false, }; try { var responseStr = DoRequest(url, JsonConvert.SerializeObject(requestData)); if (string.IsNullOrEmpty(responseStr)) { result.msg = "返回数据为空"; } else { backRefund responseBody = (backRefund)JsonConvert.DeserializeObject(responseStr, typeof(backRefund)); if (responseBody.status == "0") { result.IsSuccess = true; result.msg = JsonConvert.SerializeObject(responseBody); } else { result.IsSuccess = false; result.msg = responseBody.msg; } //记录在日志表 mlog.code = responseBody.status; mlog.describe = responseBody.msg; } } catch (Exception ex) { result.msg = "异常" + ex.Message; } #region 记录在日志表 mlog.req_type = "discardcodecallback"; mlog.respstr = result.msg; mlog.resptime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); new lvmama_reqlogData().EditReqlog(mlog); #endregion return(result); }
public static void AsyncSendSms(discardcodecallbackmodel discardcodecalljson, Agent_company agentinfo) { var lvmamadata = new LVMAMA_Data(agentinfo.Lvmama_uid, agentinfo.Lvmama_password, agentinfo.Lvmama_Apikey); var asynnoticecall = lvmamadata.discardcodecallbacksend(discardcodecalljson, agentinfo.Id); }