//付款操作 private ResponseModel PayRun(string body, string total_fee, string authCode, string djid, string tzid, string mdid, string fkid, string fkpt) { try { KPay.IMicroPay pClient = new KPay.DefaultMicroPay(tzid, fkid, fkpt).Create(); string rt = pClient.Run(body, total_fee, authCode, djid, mdid); if (rt != "SUCCESS") { return(ResponseModel.setRes(201, "", rt)); } else { return(ResponseModel.setRes(0, rt, "")); } } catch (KPay.Common.kException ex) { return(ResponseModel.setRes(1, ex.Message.ToString())); } catch (System.TimeoutException ex) { return(ResponseModel.setRes(1, "请求超时,请重试!")); } catch (Exception ex) { return(ResponseModel.setRes(1, ex.ToString())); } }
/// <summary> /// 付款操作,微信刷卡 /// </summary> /// <param name="body">服装</param> /// <param name="total_fee">支付金额</param> /// <param name="authCode">认证</param> /// <param name="djid"></param> /// <param name="tzid"></param> /// <param name="mdid"></param> /// <param name="fkid"></param> /// <param name="fkpt"></param> /// <returns></returns> private string PayRun(string body, string total_fee, string authCode, string djid, string tzid, string mdid, string fkid, string fkpt) { // fkpt | fkid // wxzf | -19 //unionpay | -24 // zfb | -20 try { KPay.IMicroPay pClient = new KPay.DefaultMicroPay(tzid, fkid, fkpt).Create(); return(pClient.Run(body, total_fee, authCode, djid, mdid)); } catch (KPay.Common.kException ex) { return(ex.Message.ToString()); } catch (System.TimeoutException ex) { return("请求超时,请重试!"); } catch (Exception ex) { return(ex.ToString()); } }