/// <summary>
 /// Deactivates a <see cref="IGatewayProviderSettings"/>
 /// </summary>
 /// <param name="gatewayProviderSettings">The <see cref="IGatewayProviderSettings"/> to be deactivated</param>
 public void DeactivateProvider(IGatewayProviderSettings gatewayProviderSettings)
 {
     if (!gatewayProviderSettings.Activated)
     {
         return;
     }
     GatewayProviderService.Delete(gatewayProviderSettings);
     GatewayProviderResolver.RefreshCache();
 }
 /// <summary>
 /// Instantiates a GatewayProvider given its registered Key
 /// </summary>
 /// <param name="gatewayProviderKey">
 /// The gateway provider key
 /// </param>
 /// <param name="activatedOnly">
 /// Search only activated providers
 /// </param>
 /// <returns>
 /// An instantiated GatewayProvider
 /// </returns>
 public T GetProviderByKey(Guid gatewayProviderKey, bool activatedOnly = true)
 {
     return(GatewayProviderResolver.GetProviderByKey <T>(gatewayProviderKey, activatedOnly));
 }
 /// <summary>
 /// Lists all available providers.  This list includes providers that are just resolved and not configured
 /// </summary>
 /// <returns>A collection of all GatewayProviders</returns>
 public IEnumerable <GatewayProviderBase> GetAllProviders()
 {
     return(GatewayProviderResolver.GetAllProviders <T>());
 }