Beispiel #1
0
        /// <summary>
        /// Returns a list of all of GatewayProviders of GatewayProviderType Payment
        ///
        /// GET /umbraco/Merchello/NotificationGatewayApi/GetAllGatewayProviders/
        /// </summary>
        /// <returns>
        /// A collection for <see cref="GatewayResourceDisplay"/>
        /// </returns>
        public IEnumerable <GatewayProviderDisplay> GetAllGatewayProviders()
        {
            var providers = _notificationContext.GetAllActivatedProviders();

            if (providers == null)
            {
                throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
            }

            return(providers.Select(provider => provider.GatewayProviderSettings.ToGatewayProviderDisplay()));
        }