Esempio n. 1
0
        public RegistrationController()
        {
            this._paymentClient = new PaymentClient(ConfigurationManager.AppSettings["MollieLiveKey"]);

            this._capacityRepository = new CapacityRepository();

            this._userRepository = new UserRepository();
        }
 public RetailPaymentDepositHandler(IRequestHandler <RetailPaymentCommand, Unit> inner,
                                    IRetailTransactionStore transactionStore, IPaymentClient paymentClient, IRepeaterFactory repeaterFactory)
 {
     this.inner            = inner;
     this.transactionStore = transactionStore;
     this.paymentClient    = paymentClient;
     this.repeaterFactory  = repeaterFactory;
 }
 public void InitClass()
 {
     this.EnsureTestApiKey();
     this._paymentClient       = new PaymentClient(this.ApiTestKey);
     this._paymentMethodClient = new PaymentMethodClient(this.ApiTestKey);
     this._refundClient        = new RefundClient(this.ApiTestKey);
     this._subscriptionClient  = new SubscriptionClient(this.ApiTestKey);
     this._mandateClient       = new MandateClient(this.ApiTestKey);
     this._customerClient      = new CustomerClient(this.ApiTestKey);
     this._profileClient       = new ProfileClient(this.ApiTestKey);
 }
Esempio n. 4
0
        public BaseApiTestFixture()
        {
            EnsureTestApiKey();

            PaymentClient       = new PaymentClient(this.ApiTestKey);
            PaymentMethodClient = new PaymentMethodClient(this.ApiTestKey);
            RefundClient        = new RefundClient(this.ApiTestKey);
            IssuerClient        = new IssuerClient(this.ApiTestKey);
            SubscriptionClient  = new SubscriptionClient(this.ApiTestKey);
            MandateClient       = new MandateClient(this.ApiTestKey);
            CustomerClient      = new CustomerClient(this.ApiTestKey);
            ProfileClient       = new ProfileClient(this.ApiTestKey);
        }
Esempio n. 5
0
        public BaseApiTestFixture()
        {
            EnsureTestApiKey();

            ClientService       = new ClientService(ApiTestKey);
            PaymentClient       = new PaymentClient(ClientService);
            PaymentMethodClient = new PaymentMethodClient(ClientService);
            RefundClient        = new RefundClient(ClientService);
            SubscriptionClient  = new SubscriptionClient(ClientService);
            MandateClient       = new MandateClient(ClientService);
            CustomerClient      = new CustomerClient(ClientService);
            ProfileClient       = new ProfileClient(ClientService);
            OrderClient         = new OrderClient(ClientService);
        }
Esempio n. 6
0
        public MollieClient(string apiKey)
        {
            if (string.IsNullOrEmpty(apiKey))
            {
                throw new ArgumentException("Mollie API key cannot be empty");
            }

            this._paymentClient       = new PaymentClient(apiKey);
            this._paymentMethodClient = new PaymentMethodClient(apiKey);
            this._refundClient        = new RefundClient(apiKey);
            this._issuerClient        = new IssuerClient(apiKey);
            this._subscriptionClient  = new SubscriptionClient(apiKey);
            this._mandateClient       = new MandateClient(apiKey);
            this._customerClient      = new CustomerClient(apiKey);
        }
Esempio n. 7
0
        public MolliePaymentService(
            DataContext ctx,
            IConfiguration configuration,
            ILogger <MolliePaymentService> logger,
            Helpers.Environment environment
            )
        {
            _ctx    = ctx;
            _logger = logger;

            this.MOLLIE_KEY          = environment.GetEnvOrConfig("Mollie", "Key", EnvVariable.MollieKey);
            this.MOLLIE_REDIRECT_URL = environment.GetEnvOrConfig("Mollie", "RedirectURL", EnvVariable.MollieRedirectURL);
            this.MOLLIE_WEBHOOK_URL  = environment.GetEnvOrConfig("Mollie", "WebhookURL", EnvVariable.MollieWebhookUrl);

            _client = this.SetupPaymentClient();
        }
        public void InitClass()
        {
            string apiKey = this.GetApiKeyFromConfiguration();

            this.EnsureTestApiKey(apiKey);

            this._paymentClient       = new PaymentClient(apiKey);
            this._paymentMethodClient = new PaymentMethodClient(apiKey);
            this._refundClient        = new RefundClient(apiKey);
            this._subscriptionClient  = new SubscriptionClient(apiKey);
            this._mandateClient       = new MandateClient(apiKey);
            this._customerClient      = new CustomerClient(apiKey);
            this._profileClient       = new ProfileClient(apiKey);
            this._orderClient         = new OrderClient(apiKey);
            this._shipmentClient      = new ShipmentClient(apiKey);
        }
Esempio n. 9
0
        public BaseApiTestFixture()
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(Directory.GetCurrentDirectory())
                          .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

            Configuration = builder.Build();

            var services = new ServiceCollection();

            services.Configure <AppSettings>(Configuration.GetSection(nameof(AppSettings)));

            var appSettings = new AppSettings();

            Configuration.GetSection(nameof(AppSettings)).Bind(appSettings);

            services.AddHttpClient();
            services.AddSingleton <IClientService, ClientService>();
            services.AddSingleton <IJsonConverterService, JsonConverterService>();
            services.AddSingleton <IValidatorService, ValidatorService>();

            // Register all available forms
            services.AddTransient <PaymentClient>();
            services.AddTransient <PaymentMethodClient>();
            services.AddTransient <RefundClient>();
            services.AddTransient <SubscriptionClient>();
            services.AddTransient <MandateClient>();
            services.AddTransient <CustomerClient>();
            services.AddTransient <CustomerClient>();
            services.AddTransient <ProfileClient>();
            services.AddTransient <OrderClient>();

            ServiceProvider = services.BuildServiceProvider();

            ClientService       = ServiceProvider.GetRequiredService <IClientService>();
            PaymentClient       = ServiceProvider.GetRequiredService <PaymentClient>();
            PaymentMethodClient = ServiceProvider.GetRequiredService <PaymentMethodClient>();
            RefundClient        = ServiceProvider.GetRequiredService <RefundClient>();
            SubscriptionClient  = ServiceProvider.GetRequiredService <SubscriptionClient>();
            MandateClient       = ServiceProvider.GetRequiredService <MandateClient>();
            CustomerClient      = ServiceProvider.GetRequiredService <CustomerClient>();
            CustomerClient      = ServiceProvider.GetRequiredService <CustomerClient>();
            ProfileClient       = ServiceProvider.GetRequiredService <ProfileClient>();
            OrderClient         = ServiceProvider.GetRequiredService <OrderClient>();

            EnsureTestApiKey();
        }
Esempio n. 10
0
 public PaymentGateway(IPaymentClient paymentClient)
 {
     this.paymentClient = paymentClient;
 }
Esempio n. 11
0
 public PaymentClientTests(IPaymentClient client)
 {
     _client = client;
 }
Esempio n. 12
0
 public PaymentController(IPaymentClient paymentClient)
 {
     this.paymentClient = paymentClient;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentStorageClient"/> class.
 /// </summary>
 /// <param name="paymentClient">The payment client.</param>
 /// <param name="mapper">The mapper.</param>
 /// <param name="configuration">The configuration.</param>
 /// <autogeneratedoc />
 public PaymentStorageClient(IPaymentClient paymentClient, IMapper mapper, IConfiguration configuration)
 {
     _paymentClient = paymentClient;
     _mapper        = mapper;
     _configuration = configuration;
 }
Esempio n. 14
0
 public PaymentController()
 {
     this._paymentClient = new PaymentClient(AppSettings.MollieApiKey);
 }
Esempio n. 15
0
 public PaymentController() {
     this._mollieClient = new MollieClient(AppSettings.MollieApiKey);
 }
Esempio n. 16
0
 public BankClient(IAuthClient auth, IPaymentClient payment)
 {
     Auth    = auth ?? throw new ArgumentNullException(nameof(auth));
     Payment = payment ?? throw new ArgumentNullException(nameof(payment));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentOverviewClient"/> class.
 /// </summary>
 /// <param name="mapper">The mapper.</param>
 /// <param name="paymentClient">The payment client.</param>
 /// <autogeneratedoc />
 public PaymentOverviewClient(IMapper mapper, IPaymentClient paymentClient) : base(mapper)
 {
     _paymentClient = paymentClient;
 }
Esempio n. 18
0
 public MandateController()
 {
     this._mandateClient = new MandateClient(AppSettings.MollieApiKey);
     this._paymentClient = new PaymentClient(AppSettings.MollieApiKey);
 }
Esempio n. 19
0
 public RefundPaymentClient(IRefundClient refundClient, IPaymentClient paymentClient)
 {
     this._refundClient  = refundClient;
     this._paymentClient = paymentClient;
 }
Esempio n. 20
0
 public RefundPaymentClient(IRefundClient refundClient, IPaymentClient paymentClient)
 {
     _refundClient  = refundClient;
     _paymentClient = paymentClient;
 }
Esempio n. 21
0
        public void BeforeEveryTest()
        {
            var serviceProvider = GetServiceProvider();

            paymentClient = serviceProvider.GetService <IPaymentClient>();
        }