public IActionResult Configure(GLSModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }

            try
            {
                _glsSettings.EndpointAddress    = model.EndpointAddress;
                _glsSettings.AmountNearestShops = model.AmountNearestShops;
                _glsSettings.Tracing            = model.Tracing;
                _glsSettings.PricesEndsWith     = model.PricesEndsWith;
                _glsSettings.FreeShippingLimit  = model.FreeShippingLimit;
                _glsSettings.Separator          = model.Separator;

                _settingService.SaveSetting(_glsSettings);

                _glsService.UpdateCountries(model.GLSCountries);
            }
            catch (Exception ex)
            {
                Exception inner = ex;
                while (inner.InnerException != null)
                {
                    inner = inner.InnerException;
                }
                _logger.Error("Configure GLS: " + inner.Message, ex);
                model.ErrorMessage += "<br />" + inner.Message;
            }

            return(View("~/Plugins/Shipping.GLS/Views/Configure.cshtml", model));
        }
        public IActionResult Configure()
        {
            GLSModel model = null;

            try
            {
                model = GetBaseModel();
            }
            catch (Exception ex)
            {
                Exception inner = ex;
                while (inner.InnerException != null)
                {
                    inner = inner.InnerException;
                }
                _logger.Error("Configure GLS: " + inner.Message, ex);
                model.ErrorMessage += "<br />" + inner.Message;
            }

            return(View("~/Plugins/Shipping.GLS/Views/Configure.cshtml", model));
        }