public List <Charge> List() { //StripeConfiguration.SetApiKey(_config.GetSection("api_key").Value); var service = new ChargeService(); var optionsl = new ChargeListOptions { Limit = 100, }; var orders = service.List(optionsl); foreach (var order in orders) { var services = new ChargeService(); var options = new ChargeGetOptions(); options.AddExpand("customer"); options.AddExpand("order"); var charge = service.Get(order.Id, options); order.Created = charge.Created.Date; order.Amount = charge.Amount; order.AmountRefunded = charge.AmountRefunded; if (order.Customer != null) { if (charge.Customer.Email == "*****@*****.**") { charge.Customer.Email = ""; } } } return(orders.Data); }
public virtual Task<Charge> GetAsync(string chargeId, ChargeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { return this.GetEntityAsync(chargeId, options, requestOptions, cancellationToken); }
public virtual Charge Get(string chargeId, ChargeGetOptions options = null, RequestOptions requestOptions = null) { return this.GetEntity(chargeId, options, requestOptions); }
public virtual Charge Get(string id, ChargeGetOptions options = null, RequestOptions requestOptions = null) { return(this.GetEntity(id, options, requestOptions)); }
public async Task <Charge> GetAsync(string chargeId, ChargeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { return(await chargeService.GetAsync(chargeId, options, requestOptions, cancellationToken)); }