public PayPalService(PayPalOptions options)
 {
     _merchantEmail = options.MerchantEmail;
     _returnUrl     = options.ReturnUrl;
     _cancelUrl     = options.CancelUrl;
     _currencyCode  = options.CurrencyCode;
     _discount      = options.Discount;
     _tax           = options.Tax;
     _paypalUrl     = options.PayPalUrl;
 }
Exemple #2
0
 public HomeController(IOptionsMonitor <PayPalOptions> optionsMonitor)
 {
     _options = optionsMonitor.CurrentValue;
 }
Exemple #3
0
 public static IServiceCollection AddPayPalService(this IServiceCollection services, PayPalOptions options)
 {
     return(services.AddTransient <IPayPalService>(DefaultServiceProviderFactory => { return new PayPalService(options); }));
 }