static void TestCustomer(StripeApi gateway) { StripeCustomerInfo customer = new StripeCustomerInfo (); //customer.Card = GetCC (); StripeCustomer customer_resp = gateway.CreateCustomer(customer); string customer_id = customer_resp.ID; StripeCustomer customer_info = gateway.GetCustomer(customer_id); Console.WriteLine (customer_info); StripeCustomer ci2 = gateway.DeleteCustomer(customer_id); if (ci2.Deleted == false) throw new Exception ("Failed to delete " + customer_id); }
static void TestCustomerAndCharge(StripeApi gateway) { StripeCustomerInfo customer = new StripeCustomerInfo (); //customer.Card = GetCC (); StripeCustomer response = gateway.CreateCustomer(customer); string customer_id = response.ID; StripeCustomer customer_info = gateway.GetCustomer(customer_id); Console.WriteLine (customer_info); StripeCustomerInfo info_update = new StripeCustomerInfo (); info_update.Card = GetCC (); StripeCustomer update_resp = gateway.UpdateCustomer(customer_id, info_update); Console.Write ("Customer updated with CC. Press ENTER to continue..."); Console.Out.Flush (); Console.ReadLine (); StripeCustomer ci2 = gateway.DeleteCustomer(customer_id); if (ci2.Deleted == false) throw new Exception ("Failed to delete " + customer_id); }