/// <summary> /// 5001 /// </summary> /// <param name="dt"></param> /// <returns></returns> private ReceiveFundProfitMessage Assignment5001(DateTime dt) { ReceiveFundProfitMessage pEnity = new ReceiveFundProfitMessage(); pEnity.MerchantID = HuaAnConfigurationAppSitting.MerchantID; pEnity.Merchantdate = dt.ToString("yyyyMMdd"); pEnity.Pageno = "1"; pEnity.RetURL = ""; pEnity.Memo = "ceshi"; return(pEnity); }
/// <summary> /// 获取华安接口中:每万份收益、年化收益率(5002) /// </summary> /// <param name="pRequest"></param> /// <returns></returns> private void GetProfit() { DateTime dt = DateTime.Now; string seqNO = HuaAnFactory.GenerateSeqNO(); //处理调用华安请求From表单对象 //ReceiveProfitSelectMessage entity = AssignmentProfit(dt); //查询年化收益率 // ReceivePaySingleQueryMessage entity = AssignmentSingleQuery(dt); //3001 ReceiveFundProfitMessage entity = Assignment5000(dt); //500 string strContent = Utility.GetRequsetXml(entity); HanAnRequestMessage rMessage = new HuaAnFactory().FormRequestContent(dt, strContent, 5001, seqNO); IDictionary <string, string> dic = HuaAnFactory.SetFormPara(rMessage); HttpWebResponse webResponse = HttpHelper.CreatePostHttpResponse(HuaAnConfigurationAppSitting.ReservationServletUrl, dic, null, null, Encoding.UTF8, null); string content = HttpHelper.GetResponseString(webResponse); Hashtable htComm = GetCommonreturn(content); HanAnMessage msg = new HanAnMessage { verNum = htComm["verNum"].ToString(), sysdate = htComm["sysdate"].ToString(), systime = htComm["systime"].ToString(), txcode = htComm["txcode"].ToString(), seqNO = htComm["seqNO"].ToString(), maccode = htComm["maccode"].ToString(), content = htComm["content"].ToString() }; if (msg != null) { string decrypt = Utility.AESDecrypt(msg.content, HuaAnConfigurationAppSitting.AesKey); SendFundProfitMessage profitMsg = GetProfitMsg(decrypt); string[] profitN = profitMsg.Content.Split('\n'); foreach (var item in profitN) { string profit = item; string[] profitArray = profit.Split('|'); } // string[] profit = profitMsg.Content.Split('|'); } Model = rMessage; }