Example #1
0
        public void CreateCustomer_Test()
        {
            dynamic response = _client.CreateCustomer(_card, email: _email);

            Assert.NotNull(response);
            Assert.False(response.IsError);
            Assert.NotNull(response.Id);
        }
Example #2
0
        public void Setup()
        {
            _card = new CreditCard {
                Number   = "4111111111111111",
                ExpMonth = 3,
                ExpYear  = 2015
            };

            _client   = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }
Example #3
0
        public ChargeTests()
        {
            _card = new CreditCard {
                Number = "4242 4242 4242 4242",
                ExpMonth = 3,
                ExpYear = 2015
            };

            _client = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }
        public ChargeTests()
        {
            _card = new CreditCard {
                Number = "4242 4242 4242 4242",
                ExpMonth = DateTime.Now.Month,
                ExpYear = DateTime.Now.AddYears(1).Year
            };

            _client = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }
Example #5
0
        public ChargeTests()
        {
            _card = new CreditCard {
                Number   = "4242 4242 4242 4242",
                ExpMonth = DateTime.Now.Month,
                ExpYear  = DateTime.Now.AddYears(1).Year
            };

            _client   = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }
Example #6
0
        public InvoiceTests()
        {
            _card = new CreditCard {
                Number   = "4242424242424242",
                ExpMonth = 3,
                ExpYear  = 2015
            };

            _client   = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }
Example #7
0
        public InvoiceTests()
        {
            _card = new CreditCard
            {
                Number = "4242424242424242",
                ExpMonth = 3,
                ExpYear = (DateTime.Now.Year + 2)
            };

            _client = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }
        public SubscriptionTests()
        {
            _client = new StripeClient(Constants.ApiKey);

            var id = Guid.NewGuid().ToString();
            var card = new CreditCard {
                Number = "4111111111111111",
                ExpMonth = 3,
                ExpYear = 2015
            };

            _plan = _client.CreatePlan(id, 400M, "usd", PlanFrequency.Month, id);
            _customer = _client.CreateCustomer(card);
        }
        public void Setup()
        {
            _client = new StripeClient(Constants.ApiKey);

            var id   = Guid.NewGuid().ToString();
            var card = new CreditCard {
                Number   = "4111111111111111",
                ExpMonth = 3,
                ExpYear  = 2015
            };

            _plan     = _client.CreatePlan(id, 400M, "usd", PlanFrequency.Month, id);
            _customer = _client.CreateCustomer(card);
        }
        public SubscriptionTests()
        {
            _client = new StripeClient(Constants.ApiKey);

            var id   = Guid.NewGuid().ToString();
            var card = new CreditCard
            {
                Number   = "4242424242424242",
                ExpMonth = 3,
                ExpYear  = (DateTime.Now.Year + 2)
            };

            _plan     = _client.CreatePlan(id, 400M, "usd", PlanFrequency.Month, id);
            _customer = _client.CreateCustomer(card);
        }
        public SubscriptionTests()
        {
            _client = new StripeClient(Constants.ApiKey);

            var id = Guid.NewGuid().ToString();
            var card = new CreditCard
            {
                Number = "4242424242424242",
                ExpMonth = 3,
                ExpYear = (DateTime.Now.Year + 2)
            };

            _plan = _client.CreatePlan(id, 400M, "usd", PlanFrequency.Month, id);
            _customer = _client.CreateCustomer(card);
            _subscription = _client.CreateCustomersSubscription(_customer.Id, _plan.Id);
        }
Example #12
0
        public void Setup()
        {
            _card = new CreditCardRequest {
                Number = "4111111111111111",
                ExpMonth = 3,
                ExpYear = 2015
            };

            _client = new StripeClient(Constants.ApiKey);
            _customer = _client.CreateCustomer(_card);
        }