示例#1
0
        private Session ExpandAsSession(Stripe.Event stripeEvent)
        {
            var session = stripeEvent.Data.Object as Session;
            var service = new SessionService();

            var options = new SessionGetOptions();

            options.AddExpand("customer");

            return(service.Get(session.Id, options));
        }
        public async Task <Session> GetCheckoutSession(string sessionId)
        {
            var options = new SessionGetOptions();

            options.AddExpand("setup_intent");
            options.AddExpand("payment_intent");

            var service = new  SessionService();

            return(await service.GetAsync(sessionId, options));
        }
示例#3
0
 public virtual Task <Session> GetAsync(string sessionId, SessionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(this.GetEntityAsync(sessionId, options, requestOptions, cancellationToken));
 }
示例#4
0
 public virtual Session Get(string sessionId, SessionGetOptions options = null, RequestOptions requestOptions = null)
 {
     return(this.GetEntity(sessionId, options, requestOptions));
 }