Esempio n. 1
0
        public static void RegisterPayPalServices(this ContainerBuilder builder, IConfiguration configuration)
        {
            builder.RegisterType <PayPalService>().As <IPayPalService>().SingleInstance();
            var paypalConfigurationProvider = new PayPalConfigurationProvider(configuration);

            builder.RegisterInstance(paypalConfigurationProvider).AsSelf();
        }
Esempio n. 2
0
 public PayPalHttpClient(PayPalConfigurationProvider configurationProvider)
 {
     _configurationProvider = configurationProvider;
     _http = new HttpClient
     {
         BaseAddress = new Uri(_configurationProvider.PayPalUrl),
         Timeout     = TimeSpan.FromSeconds(30)
     };
 }
Esempio n. 3
0
 public PayPalService(PayPalConfigurationProvider configurationProvider)
 {
     _http = new PayPalHttpClient(configurationProvider);
 }