Class PaymentHttpClientBuilderExtensions
- Namespace
- NuvTools.Payment.Extensions
- Assembly
- NuvTools.Payment.dll
Shared HttpClient registration helpers for payment provider API clients.
public static class PaymentHttpClientBuilderExtensions
- Inheritance
-
PaymentHttpClientBuilderExtensions
- Inherited Members
Fields
StandardPaymentResilience
The canonical resilience policy applied to payment provider HttpClients: 2 retries with 1s delay, 30s per-attempt timeout, 60s circuit-breaker sampling, 90s total request timeout.
public static readonly Action<HttpStandardResilienceOptions> StandardPaymentResilience
Field Value
- Action<HttpStandardResilienceOptions>
Methods
AddPaymentResilientHttpClient<TInterface, TImpl>(IServiceCollection, string)
Registers a typed HttpClient for a payment provider API client with the standard resilience policy used across all NuvTools.Payment providers.
public static IHttpClientBuilder AddPaymentResilientHttpClient<TInterface, TImpl>(this IServiceCollection services, string name) where TInterface : class where TImpl : class, TInterface
Parameters
servicesIServiceCollectionThe service collection.
namestringThe named HttpClient identifier.
Returns
- IHttpClientBuilder
The IHttpClientBuilder for further configuration.
Type Parameters
TInterfaceThe contract interface.
TImplThe concrete implementation.