mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
Add Stripe Adapter and IBraintreeGateway to DI (#1596)
This commit is contained in:
@ -184,6 +184,18 @@ namespace Bit.Core.Utilities
|
||||
// Required for UserService
|
||||
services.AddWebAuthn(globalSettings);
|
||||
|
||||
services.AddSingleton<IStripeAdapter, StripeAdapter>();
|
||||
services.AddSingleton<Braintree.IBraintreeGateway>((serviceProvider) =>
|
||||
{
|
||||
return new Braintree.BraintreeGateway
|
||||
{
|
||||
Environment = globalSettings.Braintree.Production ?
|
||||
Braintree.Environment.PRODUCTION : Braintree.Environment.SANDBOX,
|
||||
MerchantId = globalSettings.Braintree.MerchantId,
|
||||
PublicKey = globalSettings.Braintree.PublicKey,
|
||||
PrivateKey = globalSettings.Braintree.PrivateKey
|
||||
};
|
||||
});
|
||||
services.AddSingleton<IPaymentService, StripePaymentService>();
|
||||
services.AddSingleton<IMailService, HandlebarsMailService>();
|
||||
services.AddSingleton<ILicensingService, LicensingService>();
|
||||
|
Reference in New Issue
Block a user