예제 #1
0
        public async Task <Charge> CreateCaptureAsync(string chargeId, decimal amount, decimal applicationFeeAmount)
        {
            var options = new Stripe.ChargeCaptureOptions
            {
                Amount = (long)(amount * 100),
                ApplicationFeeAmount = (long)(applicationFeeAmount * 100)
            };

            var service = new Stripe.ChargeService();

            return(await service.CaptureAsync(chargeId, options));
        }
 public virtual Task<Charge> CaptureAsync(string chargeId, ChargeCaptureOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
 {
     return this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(chargeId)}/capture", options, requestOptions, cancellationToken);
 }
예제 #3
0
 public virtual Task <Charge> CaptureAsync(string chargeId, ChargeCaptureOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(this.PostRequestAsync <Charge>($"{this.InstanceUrl(chargeId)}/capture", options, requestOptions, cancellationToken));
 }
 public virtual Charge Capture(string chargeId, ChargeCaptureOptions options = null, RequestOptions requestOptions = null)
 {
     return this.Request(HttpMethod.Post, $"{this.InstanceUrl(chargeId)}/capture", options, requestOptions);
 }
예제 #5
0
 public virtual Charge Capture(string chargeId, ChargeCaptureOptions options, RequestOptions requestOptions = null)
 {
     return(this.PostRequest <Charge>($"{this.InstanceUrl(chargeId)}/capture", options, requestOptions));
 }