public ActionResult WeixinOrderPay(OrderPayDTO model) { IF2FTradeService service = new WeixinTradeService(); service.SetAuthToken("1366316402"); var result = service.OrderPay(model); JavaScriptSerializer jss = new JavaScriptSerializer(); ViewData["resultMessage"] = string.Format("运行结果:{0}", jss.Serialize(result));; return(View(model)); }
/// <summary> /// 订单退款 /// </summary> /// <returns></returns> public ActionResult RefundOrderWeixin(RefundDTO dto) { try { IF2FTradeService service = new WeixinTradeService(); service.SetAuthToken("1366316402"); dto.OperatorId = "111"; var result = service.Refund(dto); return(Content(string.Format("传参值:{0}<br/>请求结果:{1}<br/>子商户:{2}", new JavaScriptSerializer().Serialize(dto), result.ResponseBody, "1366316402"))); } catch (Exception e) { return(Content(string.Format("发生异常:{0}", e.Message))); } }