public OrderController(IOrderService orderService, IShippingService shippingService, IPayPalService payPalService, Fashinon dbContext) { this.orderService = orderService; this.shippingService = shippingService; this.payPalService = payPalService; this.dbContext = dbContext; }
public PayPalRestApiControllerBase( string systemName, IPayPalService payPalService) { SystemName = systemName; PayPalService = payPalService; }
public PayPalController(IPayPalService payPalService, AuthContext authContext, WebsiteContext websiteContext, UserManager <ApplicationUser> userManager) { _payPalService = payPalService; _authContext = authContext; _websiteContext = websiteContext; _userManager = userManager; }
public AddFundsController(IPayPalService payPalService, IDistributedCache distributedCache, IAccountsService accountsService) { _payPalService = payPalService; _distributedCache = distributedCache; _accountsService = accountsService; }
public PaymentController(IQueryDispatcher queryDispatcher, ICommandDispatcher commandDispatcher, IAddressProvider addressProvider, ICreditCardService creditCardService, IPayPalService paypalService) { this._queryDispatcher = queryDispatcher; this._commandDispatcher = commandDispatcher; this._addressProvider = addressProvider; this._creditCardService = creditCardService; this._paypalService = paypalService; }
public PayPalTest() { var configuration = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json").Build(); var configurationProvider = new PayPalConfigurationProvider(configuration); _payPalService = new PayPalService(configurationProvider); }
public InvoiceService( IPaymentTransactionRepository paymentTransactionRepository, IPayPalService payPalService, IRestClient restClient ) { _paymentTransactionRepository = paymentTransactionRepository; _payPalService = payPalService; _restClient = restClient; }
/// <summary> /// Unity.Mvc4 has been used for dependency injection /// </summary> /// <param name="logger">Log4net instance for logging</param> /// <param name="payPalService">for PayPal/Credit card payments</param> /// <param name="emailService">for sending emails</param> /// <param name="db">database where the transaction details are stoed</param> public PaymentController(ILog logger, IPayPalService payPalService, IEmailService emailService, IFakeGroveMartDb db) { _logger = logger; _payPalService = payPalService; _emailService = emailService; _groveMartdb = db as FakeGroveMartDb; // add some dummy order data to database if (_groveMartdb != null && _groveMartdb.Sets.Count == 0) _groveMartdb.AddSet(TestData.Orders); }
public DonationService(IPayPalService paypalService, IGeocodeService geocodeService, IDonationRepository donationRepository, IAccountRepository accountRepositoty, IEmailService emailService, ILog log) { _paypalService = paypalService; _geocodeService = geocodeService; _donationRepository = donationRepository; _accountRepository = accountRepositoty; _emailService = emailService; _paypalEmail = ConfigurationManager.AppSettings["PayPal:PrimaryEmail"]; Log = log; }
public PayPalPaymentsController(IPayPalService payPalService, IPaymentsUnitOfWork paymentsUnitOfWork, IPaymentsService paymentsService, IProductValidationService validationService, ISubscriptionEventService subscriptionEventService) { _payPalService = payPalService; _paymentsUnitOfWork = paymentsUnitOfWork; _paymentsService = paymentsService; _validationService = validationService; _subscriptionEventService = subscriptionEventService; }
public PayPalController( IOrchardServices orchardServices, IRepository <PaymentRecord> repository, IPaymentEventHandler paymentEventHandler, IPayPalService PayPalService) { _orchardServices = orchardServices; _posService = new PayPalPosService(orchardServices, repository, paymentEventHandler); _PayPalService = PayPalService; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public static IServiceCollection AddPaymentProviderFactory(this IServiceCollection services) { services.AddScoped <IPaymentProviderFactory>(sp => { PaymentProviderFactory factory = new(); IPayPalService payPalService = sp.GetRequiredService <IPayPalService>(); IPaymentProviderOptions paymentProviderOptions = sp.GetRequiredService <IPaymentProviderOptions>(); factory.RegisterPaymentProvider(PaymentProvider.PayPal, () => new PayPalPaymentProvider(payPalService, paymentProviderOptions)); return(factory); }); return(services); }
public PayPalController( ILogService logService, IBasketService basketService, IPayPalService payPalService, IShippingService shippingService, IOrderService orderService, ICustomerService customerService, Fashinon dbContext) { this.logService = logService; this.basketService = basketService; this.payPalService = payPalService; this.shippingService = shippingService; this.orderService = orderService; this.customerService = customerService; this.dbContext = dbContext; }
public PayPalPlusController( HttpContextBase httpContext, PluginMediator pluginMediator, IPayPalService payPalService, IGenericAttributeService genericAttributeService, IPaymentService paymentService, ITaxService taxService, ICurrencyService currencyService, IPriceFormatter priceFormatter) : base(payPalService) { _httpContext = httpContext; _pluginMediator = pluginMediator; _genericAttributeService = genericAttributeService; _paymentService = paymentService; _taxService = taxService; _currencyService = currencyService; _priceFormatter = priceFormatter; }
public PayPalInstalmentsController( HttpContextBase httpContext, IPayPalService payPalService, IGenericAttributeService genericAttributeService, IOrderService orderService, ICurrencyService currencyService, Lazy<IPaymentService> paymentService, IPriceFormatter priceFormatter, Lazy<IPluginFinder> pluginFinder) : base(PayPalInstalmentsProvider.SystemName, payPalService) { _httpContext = httpContext; _genericAttributeService = genericAttributeService; _orderService = orderService; _currencyService = currencyService; _paymentService = paymentService; _priceFormatter = priceFormatter; _pluginFinder = pluginFinder; }
public async Task <IActionResult> BuyTokensAsync(PayPalTransactionRequest model, [FromServices] IPayPalService payPal, CancellationToken token) { var userId = _userManager.GetLongUserId(User); var result = await payPal.GetPaymentAsync(model.Id, token); var amount = result.ReferenceId switch { "points_1" => 100, "points_2" => 500, "points_3" => 1000, _ => throw new ArgumentException(message: "invalid value") }; var command = new TransferMoneyToPointsCommand(userId, amount, model.Id); await _commandBus.DispatchAsync(command, token); return(Ok()); } #endregion }
public TestController(IPayPalService payPalService) { _payPalService = payPalService; }
public OrdersController(IPayPalService payPalService) { this.payPalService = payPalService; }
public AddPayPalOrderCommandHandler(IRepository <User> userRepository, IPayPalService payPalService, IRepository <StudyRoom> studyRoomRepository) { _userRepository = userRepository; _payPalService = payPalService; _studyRoomRepository = studyRoomRepository; }
public PayPalRestApiControllerBase(IPayPalService payPalService) { PayPalService = payPalService; }
public PayPalController(IPayPalService payPalService, IAccountsService accountsService) { _payPalService = payPalService; _accountsService = accountsService; }
public PaymentsService(IPayPalService payPalService, IPaymentsUnitOfWork paymentsUnitOfWork) { _payPalService = payPalService; _paymentsUnitOfWork = paymentsUnitOfWork; }
public PayPalCallBackController(IPayPalService payPalService) { this.PayPalService = payPalService; }
public PaymentController(IPayPalService payPalService, IPrivateLessonService privateLessonService) { _payPalService = payPalService; _privateLessonService = privateLessonService; }
public PayPalPaymentProvider(IPayPalService paypalService, IPaymentProviderOptions paymentProviderOptions) { _paypalService = paypalService ?? throw new ArgumentNullException(nameof(paypalService)); _paymentProviderOptions = paymentProviderOptions ?? throw new ArgumentNullException(nameof(paymentProviderOptions)); }