/// <summary>
        /// Checks response
        /// </summary>
        /// <param name="abstractResponse">response</param>
        /// <param name="errorMsg">Error message if exists</param>
        /// <returns>True - response OK; otherwise, false</returns>
		public static bool CheckSuccess(PluginHelper helper, AbstractResponseType abstractResponse, out string errorMsg)
        {
            bool success = false;
            StringBuilder sb = new StringBuilder();
            switch (abstractResponse.Ack)
            {
                case AckCodeType.Success:
                case AckCodeType.SuccessWithWarning:
                    success = true;
                    break;
                default:
                    break;
            }
            if (null != abstractResponse.Errors)
            {
                foreach (ErrorType errorType in abstractResponse.Errors)
                {
                    if (sb.Length <= 0)
                    {
                        sb.Append(Environment.NewLine);
                    }
					sb.AppendLine("{0}: {1}".FormatWith(helper.GetResource("Admin.System.Log.Fields.FullMessage"), errorType.LongMessage));
					sb.AppendLine("{0}: {1}".FormatWith(helper.GetResource("Admin.System.Log.Fields.ShortMessage"), errorType.ShortMessage));
                    sb.Append("Code: ").Append(errorType.ErrorCode).Append(Environment.NewLine);
                }
            }
            errorMsg = sb.ToString();
            return success;
        }
		public PayPalExpressController(
			IPaymentService paymentService, IOrderService orderService,
			IOrderProcessingService orderProcessingService,
			ILogger logger, 
			PaymentSettings paymentSettings, ILocalizationService localizationService,
			OrderSettings orderSettings,
			ICurrencyService currencyService, CurrencySettings currencySettings,
			IOrderTotalCalculationService orderTotalCalculationService, ICustomerService customerService,
			IGenericAttributeService genericAttributeService,
            IComponentContext ctx, ICommonServices services,
            IStoreService storeService)
		{
			_paymentService = paymentService;
			_orderService = orderService;
			_orderProcessingService = orderProcessingService;
			_logger = logger;
			_paymentSettings = paymentSettings;
			_localizationService = localizationService;
			_orderSettings = orderSettings;
			_currencyService = currencyService;
			_currencySettings = currencySettings;
			_orderTotalCalculationService = orderTotalCalculationService;
			_customerService = customerService;
			_genericAttributeService = genericAttributeService;
            _services = services;
            _storeService = storeService;

			_helper = new PluginHelper(ctx, "SmartStore.PayPal", "Plugins.Payments.PayPalExpress");

			T = NullLocalizer.Instance;
		}
        public PayPalDirectController(
			IPaymentService paymentService, IOrderService orderService,
			IOrderProcessingService orderProcessingService,
			PaymentSettings paymentSettings, 
            IComponentContext ctx, ICommonServices services,
            IStoreService storeService)
        {
            _paymentService = paymentService;
            _orderService = orderService;
            _orderProcessingService = orderProcessingService;
            _services = services;
            _storeService = storeService;
            _helper = new PluginHelper(ctx, "SmartStore.PayPal", "Plugins.Payments.PayPalDirect");
        }