コード例 #1
0
 /// <summary>
 /// Payment capture, can be used to change payment amount.
 /// If you do not need to make any changes in payment use <see cref="CapturePayment(string,string)"/>
 /// </summary>
 /// <param name="payment">New payment data</param>
 /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate a new one</param>
 /// <returns><see cref="Payment"/></returns>
 public Payment CapturePayment(Payment payment, string idempotenceKey = null)
 => Query <Payment>("POST", payment, $"payments/{payment.Id}/capture", idempotenceKey);
コード例 #2
0
 /// <summary>
 /// Payment capture, can be used to change payment amount.
 /// If you do not need to make any changes to the payment use <see cref="CapturePaymentAsync(string,string,CancellationToken)"/>
 /// </summary>
 /// <param name="payment">New payment data</param>
 /// <param name="cancellationToken"><see cref="CancellationToken"/></param>
 /// <param name="idempotenceKey">Idempotence key, use <value>null</value> to generate a new one</param>
 /// <returns><see cref="Payment"/></returns>
 public Task <Payment> CapturePaymentAsync(Payment payment, string idempotenceKey = null, CancellationToken cancellationToken = default(CancellationToken))
 => QueryAsync <Payment>(HttpMethod.Post, payment, $"payments/{payment.Id}/capture", idempotenceKey, cancellationToken);