Ejemplo n.º 1
0
        /// <summary>
        /// 发送订单
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public UnicomOrderInfo order(UnicomOrderParam param)
        {
            UnicomOrderInfo             info       = null;
            Dictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("authcode", param.authcode);
            parameters.Add("servicename", param.servicename);
            parameters.Add("trandateTime", param.trandateTime);
            parameters.Add("reqsn", param.reqsn);
            parameters.Add("loginId", param.loginId);
            parameters.Add("phoneNo", param.phoneNo);
            parameters.Add("paymentAmout", param.paymentAmout);
            parameters.Add("shopType", param.shopType);
            parameters.Add("account_no", param.account_no);
            parameters.Add("terminalNo", ConfigurationManager.AppSettings["MechineNo"]);
            string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("getOrderUnicom"), parameters, null);

            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            info = JsonConvert.DeserializeObject <UnicomOrderInfo>(jsonText);

            return(info);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 联通提交订单
        /// </summary>
        /// <param name="phoneNo"></param>
        /// <param name="amout"></param>
        /// <returns></returns>
        public static UnicomOrderInfo order(string phoneNo, string amout, string account, string shoptype)
        {
            UnicomOrderInfo info = null;

            try
            {
                UnicomOrderParam param = new UnicomOrderParam();
                param.authcode     = SysBLL.Authcode;
                param.servicename  = "LT002";
                param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime();
                param.reqsn        = SysBLL.getSerialNum();
                param.loginId      = SysBLL.getCpuNo();
                param.phoneNo      = phoneNo;
                param.paymentAmout = amout;
                param.shopType     = shoptype;//*************************************
                param.account_no   = account;
                info = access.order(param);
                string temp = info.msgrsp.retcode;
                return(info);
            }
            catch (Exception e) { throw new WtException(WtExceptionCode.Bus.BUS_QUERY, e.Message); }
        }