public async Task AddPaymentOption(PaymentOption paymentOption) { // update token - card var customerService = new CustomerService(); await customerService.UpdateAsync(paymentOption.CustomerId, new CustomerUpdateOptions() { Source = paymentOption.Token }); }
public async Task <Customer> UpdateCustomerAsync(string customerId, string name, string email) { var options = new CustomerUpdateOptions(); if (!string.IsNullOrEmpty(name)) { options.Name = name; } if (!string.IsNullOrEmpty(email)) { options.Email = email; } var service = new Stripe.CustomerService(); return(await service.UpdateAsync(customerId, options)); }