C# How to get all available Payment methods

1 week ago
Hi. How can I in C# obtain the list of all payment methods installed (or enabled)?
1 week ago
See nopCommerce_4.50.2\src\Presentation\Nop.Web\Controllers\CheckoutController.cs

            //all payment methods (do not filter by country here as it could be not specified yet)
            var paymentMethods = await (await _paymentPluginManager
                .LoadActivePluginsAsync(await _workContext.GetCurrentCustomerAsync(), (await _storeContext.GetCurrentStoreAsync()).Id))
                .WhereAwait(async pm => !await pm.HidePaymentMethodAsync(cart)).ToListAsync();

or See nopCommerce_4.50.2\src\Presentation\Nop.Web\Factories\CheckoutModelFactory.cs
where it is filtered by country

What version - strangley v4.4 calls it LoadActivePluginsAsyncAsync