예제 #1
0
        public static ElecOrderInfo ElecOrder(ElecPayParam payParam)
        {
            ElecInterface  access = new ElecInterface();
            ElecOrderParam param  = new ElecOrderParam();

            param.authcode     = SysBLL.Authcode;                // 认证码 not null
            param.servicename  = "DW002";                        //交易号 not null
            param.trandateTime = SysBLL.getYYYYMMDDHHMMSSTime(); //交易时间  格式:YYYYMMDDHHMMSS
            param.reqsn        = SysBLL.getSerialNum();          //请求流水号 not null【请求发起方流水号】
            param.paymentno    = payParam.Account;               //用户名 not null【用户编号】
            param.paymentamout = payParam.UserInputMoney;        //账单金额  not null【电网查询电费接口(即queryElecFees)返回的dfze(应缴电费总额)】
            param.shopType     = payParam.ShopType;              //*******************************
            ElecOrderInfo info = access.ElecOrder(param);

            return(info);
        }
예제 #2
0
        private void load()
        {
            try
            {
                payParam = Payment.elecPayParam;


                icParams  = Payment.elecPayParam.IcParams;
                payThread = new Thread(delegate() { pay(); });
                payThread.Start();
                SysBLL.Player("交易处理中,请稍后.wav");
                timerLoad          = new DispatcherTimer();
                timerLoad.Interval = TimeSpan.FromMilliseconds(400);
                timerLoad.Tick    += new EventHandler(timer_Tick);
                timerLoad.Start();
            }
            catch (Exception ex)
            {
                log.Write("error:电力支付异常:" + ex.Message);
                exit("缴费失败,请稍后再试...");
            }
        }