public Stripe.Customer GetCustomer(string customerId) { var customerService = new Stripe.CustomerService(PrivateKey); Stripe.Customer stripeCustomer = customerService.Get(customerId); return(stripeCustomer); }
public static stripe.Customer GetOrCreateCustomer(this stripe.CustomerService customerService, Core.Domain.Customers.Customer customer, string stripeCustomerId, StripePaymentSettings paymentSettings) { if (!string.IsNullOrEmpty(stripeCustomerId)) { return(customerService.Get(stripeCustomerId)); } else { return(customerService.Create(customer.CreateCustomerOptions(paymentSettings))); } }