public void CreateCustomerSubscription_Test() { dynamic response = _client.CreateCustomersSubscription(_customer.Id, _plan.Id); Assert.NotNull(response); Assert.False(response.IsError); }
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); }
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); }