public void CreatePlan_Test() { var id = Guid.NewGuid().ToString(); var response = _client.CreatePlan(id, 400M, "usd", PlanFrequency.Month, id); Assert.IsNotNull(response); Assert.IsFalse(response.IsError); Assert.IsNotNull(response.Id); }
public void CreateCustomer_WithPlan_Test() { var id = Guid.NewGuid().ToString(); _client.CreatePlan(id, 400M, "usd", PlanFrequency.Month, id); dynamic response = _client.CreateCustomer(_card, email: _email, plan: id); Assert.NotNull(response); Assert.False(response.IsError); Assert.NotNull(response.Id); Assert.NotNull(response.Subscription); }
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); }