/// <summary>
        ///
        /// </summary>
        /// <param name="urlKey"></param>
        /// <param name="sandbox"></param>
        /// <returns></returns>
        private static string GetUrlValue(string urlKey, bool sandbox)
        {
            var appConfig        = PagSeguroConfigurationSection.GetCurrent(sandbox);
            var urlFromAppConfig = appConfig?.Urls.GetValue <string>(urlKey, sandbox);

            return(urlFromAppConfig ?? PagSeguroConfigSerializer.GetWebserviceUrl(XmlConfig, urlKey));
        }
Exemplo n.º 2
0
        private static string GetUrlValue(XmlDocument xml, string url, bool sandBox)
        {
            const string PagseguroUrl = "pagseguro.uol";

            const string SandboxUrl = "sandbox.pagseguro.uol";

            var value = PagSeguroConfigSerializer.GetWebserviceUrl(xml, url);

            return(sandBox ? value.Replace(PagseguroUrl, SandboxUrl) : value.Replace(SandboxUrl, PagseguroUrl));
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="url"></param>
 /// <returns></returns>
 private static string GetUrlValue(string url)
 {
     return(PagSeguroConfigSerializer.GetWebserviceUrl(LoadXmlConfig(), url));
 }