/// <summary> /// /// </summary> /// <param name="req"></param> /// <returns></returns> public Respbase <GetThridPayhisDto> GetThridPayhis(GetThridPayhisReq req) { TpcnThirdPartner partner = db.TpcnThirdPartnerSet.FirstOrDefault(x => x.Accesskeyid == req.SecretKey); if (partner == null) { return(new Respbase <GetThridPayhisDto> { Result = -1, Message = "secretkey不存在" }); } string Signature = Md5.SignString(req.SecretKey + req.Orderno + req.Timestamp + partner.Accesssecret); if (Signature != req.Signature) { return(new Respbase <GetThridPayhisDto> { Result = -1, Message = "签名错误" }); } var payhis = db.TpcnThirdPayhisSet.FirstOrDefault(x => x.Orderno == req.Orderno); if (payhis != null && payhis.Hisid > 0) { log.Info("订单号已存在,orderno:" + req.Orderno); return(new Respbase <GetThridPayhisDto> { Result = -6, Message = "订单号已存在,orderno:" + req.Orderno }); } var payHis = new GetThridPayhisDto { amount = payhis.Amount, body = payhis.Body, orderpcn = payhis.Hisid, createtime = payhis.Createtime, orderno = payhis.Orderno, paystatus = payhis.Paystatus, paytype = payhis.Paytype, subject = payhis.Subject }; return(new Respbase <GetThridPayhisDto> { Result = 1, Message = "验证成功", Data = payHis }); }
public Respbase <GetThridPayhisDto> GetThridPayhis(GetThridPayhisReq req) { ThridPayFacade facade = new ThridPayFacade(); var result = facade.GetThridPayhis(req); return(result); }