//TODO: join the following two methods, with help of payment method type

        /// <summary>
        /// Gets Paypal URL
        /// </summary>
        /// <returns></returns>
        public static string GetPaypalUrl(PayPalSettingsBase settings)
        {
            return settings.UseSandbox ?
                "https://www.sandbox.paypal.com/cgi-bin/webscr" :
                "https://www.paypal.com/cgi-bin/webscr";
        }
 /// <summary>
 /// Gets Paypal URL
 /// </summary>
 /// <returns></returns>
 public static string GetPaypalServiceUrl(PayPalSettingsBase settings)
 {
     return settings.UseSandbox ?
         "https://api-3t.sandbox.paypal.com/2.0/" :
         "https://api-3t.paypal.com/2.0/";
 }
        public void AddOrderNote(PayPalSettingsBase settings, Order order, string anyString, bool isIpn = false)
        {
            try
            {
                if (order == null || anyString.IsEmpty() || (settings != null && !settings.AddOrderNotes))
                    return;

                string[] orderNoteStrings = T("Plugins.SmartStore.PayPal.OrderNoteStrings").Text.SplitSafe(";");
                var faviconUrl = "{0}Plugins/{1}/Content/favicon.png".FormatInvariant(_services.WebHelper.GetStoreLocation(false), Plugin.SystemName);

                var sb = new StringBuilder();
                sb.AppendFormat("<img src=\"{0}\" style=\"float: left; width: 16px; height: 16px;\" />", faviconUrl);

                var note = orderNoteStrings.SafeGet(0).FormatInvariant(anyString);

                sb.AppendFormat("<span style=\"padding-left: 4px;\">{0}</span>", note);

                if (isIpn)
                    order.HasNewPaymentNotification = true;

                _orderService.AddOrderNote(order, sb.ToString());
            }
            catch { }
        }