Example #1
0
 //退款
 private ResponseModel PayRefund(string djid, string tzid, string fkid, string fkpt)
 {
     try
     {
         KPay.IMicroPay pClient = new KPay.DefaultMicroPay(tzid, fkid, fkpt).Create();
         string         rt      = pClient.TradeRefund(djid);
         if (rt == "SUCCESS")
         {
             return(ResponseModel.setRes(0, rt, ""));
         }
         else
         {
             return(ResponseModel.setRes(201, "", 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()));
         //return "退款异常";
     }
 }
Example #2
0
 /// <summary>
 /// 支付订单检查
 /// </summary>
 /// <param name="djid"></param>
 /// <param name="tzid"></param>
 /// <param name="fkid"></param>
 /// <param name="fkpt"></param>
 /// <returns></returns>
 private string PayRefund(string djid, string tzid, string fkid, string fkpt)
 {
     try
     {
         KPay.IMicroPay pClient = new KPay.DefaultMicroPay(tzid, fkid, fkpt).Create();
         return(pClient.TradeRefund(djid));
     }
     catch (KPay.Common.kException ex)
     {
         return(ex.Message.ToString());
     }
     catch (System.TimeoutException ex)
     {
         return("请求超时,请重试!");
     }
     catch (Exception ex)
     {
         return(ex.ToString());
         //return "退款异常";
     }
 }