/// <summary>
        /// Successes the node URL.
        /// </summary>
        /// <param name="paymentProvider">The payment provider.</param>
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        public static string ReportUrl(this PaymentProvider paymentProvider)
        {
            var baseUrl = PaymentProviderHelper.GenerateBaseUrl();

            var paymentProviderRepositoryCmsNodeName = IO.Container.Resolve <ICMSApplication>().GetPaymentProviderRepositoryCMSNodeUrlName() ?? "PaymentProviders";
            var paymentProviderSectionCmsNodeName    = IO.Container.Resolve <ICMSApplication>().GetPaymentProviderSectionCMSNodeUrlName() ?? "PaymentProviders";
            var paymentProviderPath = string.Format("/{0}/{1}/", paymentProviderRepositoryCmsNodeName, paymentProviderSectionCmsNodeName);

            // http://domain.com/paymentproviders/payentproviders/ogone

            return(string.Format("{0}{1}{2}", baseUrl, paymentProviderPath, paymentProvider.Name));
        }
        /// <summary>
        /// Successes the node URL.
        /// </summary>
        /// <param name="paymentProvider">The payment provider.</param>
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        public static string CancelUrl(this PaymentProvider paymentProvider)
        {
            var baseUrl = PaymentProviderHelper.GenerateBaseUrl();

            var cancelNodeIdAsString = paymentProvider.CancelNodeId;

            int cancelNodeId;

            int.TryParse(cancelNodeIdAsString, out cancelNodeId);

            if (cancelNodeId != 0)
            {
                var cancelUrl = IO.Container.Resolve <ICMSApplication>().GetUrlForContentWithId(cancelNodeId);
                if (!cancelUrl.StartsWith("http"))
                {
                    cancelUrl = string.Format("{0}/{1}", baseUrl, cancelUrl.TrimStart('/'));
                }

                return(cancelUrl);
            }

            return(baseUrl);
        }
        /// <summary>
        /// Successes the node URL.
        /// </summary>
        /// <param name="paymentProvider">The payment provider.</param>
        /// <returns></returns>
        /// <exception cref="System.Exception"></exception>
        public static string ErrorUrl(this PaymentProvider paymentProvider)
        {
            var baseUrl = PaymentProviderHelper.GenerateBaseUrl();

            var successNodeIdAsString = paymentProvider.ErrorNodeId;

            int errorNodeId;

            int.TryParse(successNodeIdAsString, out errorNodeId);

            if (errorNodeId != 0)
            {
                var errorUrl = IO.Container.Resolve <ICMSApplication>().GetUrlForContentWithId(errorNodeId);
                if (!errorUrl.StartsWith("http"))
                {
                    errorUrl = string.Format("{0}/{1}", baseUrl, errorUrl.TrimStart('/'));
                }

                return(errorUrl);
            }

            return(baseUrl);
        }