public ParamsData UnifiedOrder() { if (String.IsNullOrEmpty(notify_url)) { notify_url = Config.NOTIFY_URL; } //统一下单 var req = new ParamsData(); req.SetValue("body", "E717平台订单"); req.SetValue("attach", ""); req.SetValue("out_trade_no", product_id); req.SetValue("total_fee", total_fee); if (!String.IsNullOrEmpty(time_expire)) { req.SetValue("time_expire", time_expire); } else if (expire_minutes > 5) { req.SetValue("time_expire", DateTime.Now.AddMinutes(expire_minutes).ToString("yyyyMMddHHmmss")); } req.SetValue("goods_tag", ""); req.SetValue("trade_type", "NATIVE"); req.SetValue("openid", openId); req.SetValue("product_id", product_id); req.SetValue("notify_url", notify_url); return(PayApi.UnifiedOrder(req)); }