using MyCode.Project.Infrastructure.Constant; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MyCode.Project.Infrastructure.PayModels { public class ExtendedGateway { //#region FuyouWXOnlinePay(富友 公众号/服务窗统一下单) ///// ///// 富友 公众号/服务窗统一下单 ///// ///// ///// 支付类型 ALIPAY , JSAPI, QQ(QQ 钱包), UNIONPAY(银联二维码) , BESTPAY(翼支付) ///// ///// ///// //public string FuyouWXOnlinePay(FuiouOrder order, string order_type, string openid, string appid) //{ // Dictionary map = new Dictionary(); // map.Add("version", "1.0"); // map.Add("ins_cd", FuiouPayConst.ins_cd); // map.Add("mchnt_cd", order.MchId); // map.Add("term_id", FuiouPayConst.term_id); // map.Add("random_str", Guid.NewGuid().ToString("N")); // map.Add("sign", ""); // map.Add("goods_des", order.Body); // map.Add("goods_detail", ""); // map.Add("goods_tag", ""); // map.Add("txn_begin_ts", DateTime.Now.ToString("yyyyMMddhhmmss")); // map.Add("notify_url", FuiouPayConst.notify_url); // map.Add("limit_pay", ""); // if (order_type == "WECHAT") // order_type = "JSAPI"; // else if (order_type == "ALIPAY") // order_type = "FWC"; // map.Add("trade_type", order_type); // map.Add("addn_inf", order.Attach); // map.Add("openid", openid); // map.Add("product_id", ""); // map.Add("sub_openid", openid); // map.Add("sub_appid", appid); // map.Add("reserved_expire_minute", "1440"); // map.Add("mchnt_order_no", order.OutTradeNo); // map.Add("curr_type", "CNY"); // map.Add("order_amt", order.Amount.ToString()); // map.Add("term_ip", FuiouPayConst.term_ip); // string result = run(map, FuiouPayConst.fuiouOnlineWxPayUrl); // XmlDocument doc = new XmlDocument(); // doc.LoadXml(result); // string ifok = doc.SelectSingleNode("/xml/result_code").InnerText; // if (ifok == "000000") // result = doc.SelectSingleNode("/xml/reserved_pay_info").InnerText; // else // result = doc.SelectSingleNode("/xml/result_msg").InnerText; // return result; //} //#endregion } }