Class DependencyInjection
Registers Stripe as the payment provider.
public static class DependencyInjection
- Inheritance
-
DependencyInjection
- Inherited Members
Methods
AddStripeApiClient(IServiceCollection, IConfiguration)
Binds the Stripe configuration section and registers Stripe behind the
NuvTools.Payment contracts — the customer, payee account, charge, refund and webhook
clients.
public static IServiceCollection AddStripeApiClient(this IServiceCollection services, IConfiguration configuration)
Parameters
servicesIServiceCollectionThe container.
configurationIConfigurationWhere the
Stripesection is read from.
Returns
Remarks
This is the only place a caller names Stripe: everything above it depends on IPaymentCustomerClient and its siblings, so changing provider is changing this call.
The SDK's client is built over an HttpClient from the factory, so the host's own handlers and logging apply, and its retries are the SDK's: it knows which calls are safe to repeat and sends the idempotency key again when it repeats one.