示例#1
0
        public Stripe.Customer GetCustomer(string customerId)
        {
            var customerService = new Stripe.CustomerService(PrivateKey);

            Stripe.Customer stripeCustomer = customerService.Get(customerId);

            return(stripeCustomer);
        }
示例#2
0
 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)));
     }
 }