Ejemplo n.º 1
0
        /// <summary>
        /// 获取订单
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public MobileOrderInfo order(MobileOrderParam param, MobileQueryInfo info)
        {
            Dictionary <String, String> parameters = new Dictionary <String, String>();

            parameters.Add("trandateTime", param.trandateTime);
            parameters.Add("servicename", param.servicename);
            parameters.Add("reqsn", param.reqsn);
            parameters.Add("loginId", param.loginId);
            parameters.Add("mobile", param.mobile);
            parameters.Add("authcode", param.authcode);
            parameters.Add("paymentAmout", param.paymentAmout);

            parameters.Add("homeRegion", info.msgrsp.homeRegion);
            parameters.Add("homeOffice", info.msgrsp.homeOffice);
            parameters.Add("contractNo", info.msgrsp.contractNo);
            parameters.Add("overdueMoney", info.msgrsp.overdueMoney);
            parameters.Add("prepaidBalance", info.msgrsp.afterPrepaidBalance);
            parameters.Add("changeBalance", info.msgrsp.changeBalance);
            parameters.Add("channelNo", "002");
            parameters.Add("shopType", param.shopType);
            parameters.Add("terminalNo", ConfigurationManager.AppSettings["MechineNo"]);
            string jsonText = HttpHelper.getHttp(SysConfigHelper.readerNode("getOrderMobile"), parameters, null);

            //反序列化JSON字符串,将JSON字符串转换成LIST列表
            return(JsonConvert.DeserializeObject <MobileOrderInfo>(jsonText));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取订单
 /// </summary>
 /// <param name="param"></param>
 /// <returns></returns>
 public static MobileOrderInfo order(MobileOrderParam param, MobileQueryInfo info)
 {
     param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime();
     param.servicename  = "YD100";
     param.reqsn        = SysBLL.getSerialNum();
     param.loginId      = SysBLL.getCpuNo();
     //param.mobile =;
     param.authcode = SysBLL.Authcode;
     //param.paymentAmout =;
     return(mobileInterface.order(param, info));
 }
Ejemplo n.º 3
0
 public void orderInfo(ref MobileOrderInfo orderinfo, PayParam p)
 {
     try
     {
         MobileOrderParam mobileOrderParam = new MobileOrderParam();
         //获取订单
         log.Write("发起订单:电话号码:" + payParam.PhoneOn + ",缴费金额:" + payParam.UserInputMoney);
         mobileOrderParam.mobile       = payParam.PhoneOn;
         mobileOrderParam.paymentAmout = p.userInputAmount;
         mobileOrderParam.shopType     = PayAccess.isWtLkl(p.icParams);
         orderinfo = MobileAccess.order(mobileOrderParam, payParam.QueryInfo);
         if ("9999".Equals(orderinfo.msgrsp.retcode))
         {
             return;
         }
         if ("1234".Equals(orderinfo.msgrsp.retcode))
         {
             return;
         }
         if (!"0000".Equals(orderinfo.msgrsp.retcode))
         {
             return;
         }
         //获取商户号
         p.MERCHANTNO_shopNo = orderinfo.msgrsp.MERCHANTNO;
         //获取终端号
         p.TERMINALNO_clientNo = orderinfo.msgrsp.TERMINALNO;
         if (PayStaticParam.payType == 0)
         {
             //交易金额
             p.rechageAmount = p.userInputAmount;
             Payment.mobilePayParam.RechageAmount = p.userInputAmount;
         }
         else
         {
             //交易金额
             p.rechageAmount = orderinfo.msgrsp.realAmout;
             Payment.mobilePayParam.RechageAmount = orderinfo.msgrsp.realAmout;
         }
         //交易订单号
         p.orderNo = orderinfo.msgrsp.orderNo;
         Payment.mobilePayParam.OrderInfo = orderinfo;
         log.Write("订单提交成功:订单号:" + orderinfo.msgrsp.orderNo);
     }
     catch (Exception ex)
     {
         log.Write("获取缴费订单失败:" + ex.Message + Environment.NewLine + ex.InnerException);
         //获取订单的失败
         exit("充值失败,请稍后再试...");
         return;
     }
 }