/// <summary> /// 获取支付链接 /// </summary> /// <param name="model"></param> /// <returns></returns> public GetPayUrlResp GetPayUrl(GetPayUrlReq model) { try { string methodName = "getPayUrl"; model.customkey = Customkey; // model.pageNoticeUrl = LinkFun.getPageNoticeUrl(); model.pageNoticeUrl = UtilityHelper.Utils.UrlEncode(LinkFun.getPageNoticeUrl()); string strJson = SerializerHelper.ToJson(model); string sign = UtilityHelper.Utils.MD5(VI + strJson); string url = URLBaseMoFang + methodName + ".html?sign=" + sign; string retrunStr = UtilityHelper.HttpService.GetHttpWebResponseByRestSharp(url, strJson); GetPayUrlResp outModel = new GetPayUrlResp(); outModel = SerializerHelper.FromJsonTo <GetPayUrlResp>(retrunStr); if (outModel.respstat != "0000") { ReceivedLog(model.transNo, "GetPayUrl", outModel.respmsg); } return(outModel); } catch (Exception ex) { ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString()); return(null); } }
public void GetPayUrl() { BaoxianDataBLL baoxianDataBLL = new BaoxianDataBLL(); GetPayUrlReq model = new GetPayUrlReq(); model.transNo = UtilityHelper.CommonHelper.OrderNoOne(); model.caseCode = "0000052178002133"; //model.customkey = "bowangjishi"; model.insureNum = "20170907004888"; model.price = 50; model.pageNoticeUrl = pageNoticeUrl; var res = baoxianDataBLL.GetPayUrl(model); }