Exemplo n.º 1
0
        public void Setup()
        {
            context = new YunPianSMSContext();

            var config = VendorConfig.GetConfig("YunPian");

            context.Host        = config.Host;
            context.AccessToken = config.AccessToken;

            api = new YunPianSMSService(context);
        }
Exemplo n.º 2
0
        public void Setup()
        {
            context = new HuaXinTechSMSContext();

            var config = VendorConfig.GetConfig("HuaXinTech");

            context.Host        = config.Host;
            context.AccountId   = config.Username;
            context.PasswordMD5 = config.Password;
            context.Signature   = config.Signature;
            context.Userid      = "";

            api = new HuaXinTechSMSService(context);
            //string accesstoken = context.AccessToken;
        }
Exemplo n.º 3
0
        public void Setup()
        {
            var config = VendorConfig.GetConfig("CCP");

            var context = new CCPSMSContext()
            {
                Host        = config.Host,
                Port        = config.Port,
                AccountId   = config.Username,
                AccessToken = config.AccessToken,
                AppId       = config.AppId
            };

            smsService = new CCPSMSService(context);
        }
Exemplo n.º 4
0
        public void Setup()
        {
            context = new HuaXinTechSMSContext();

            var config = VendorConfig.Instances("HuaXinTech");

            context.Host        = config.Host;
            context.AccountId   = config.Username;
            context.PasswordMD5 = config.Password;
            context.Signature   = config.Signature;
            context.Userid      = "";


            //context.Host = ConfigurationManager.AppSettings["HuaXinTech_Host"];
            //context.AccountId = ConfigurationManager.AppSettings["HuaXinTech_Username"];
            //context.PasswordMD5 = ConfigurationManager.AppSettings["HuaXinTech_PasswordMD5"];
            //context.Signature = ConfigurationManager.AppSettings["HuaXinTech_Signature"]; ;
            //context.Userid = "";

            api = new HuaXinTechSMSService(context);
            //string accesstoken = context.AccessToken;
        }
 public VendorController(IVendorRepo repo, VendorConfig config, ILogger <VendorController> logger)
 {
     Repo   = repo;
     Config = config;
     Logger = logger;
 }