Exemple #1
0
        /// <summary>
        /// 查询单价
        /// </summary>
        public double GetEachFee()
        {
            string SerialNo = BLL.SysManage.ConfigSystem.GetValueByCache("Emay_SMS_SerialNo");
            string Key      = BLL.SysManage.ConfigSystem.GetValueByCache("Emay_SMS_Key");

            if (String.IsNullOrWhiteSpace(SerialNo) || String.IsNullOrWhiteSpace(Key))
            {
                LogHelp.AddErrorLog("亿美短信接口缺少企业序列号或者自定义关键字Key", "亿美短信接口调用失败", HttpContext.Current.Request);
                return(0);
            }
            try
            {
                SMSService.SDKClient sdkClient = new SDKClientClient();
                getEachFeeRequest    request   = new getEachFeeRequest(SerialNo, Key);
                getEachFeeResponse   response  = sdkClient.getEachFee(request);
                return(response.@return);
            }
            catch (Exception ex)
            {
                LogHelp.AddErrorLog("查询短信单价异常:" + ex.Message, ex.StackTrace, HttpContext.Current.Request);
                throw;
            }
        }