/// <summary> /// Captures a payment for the <see cref="IInvoice"/> /// </summary> /// <param name="invoice">The invoice to be payed</param> /// <param name="payment">The</param> /// <param name="amount">The amount to the payment to be captured</param> /// <param name="paymentGatewayMethod">The <see cref="IPaymentGatewayMethod"/> to process the payment</param> /// <returns>A <see cref="IPaymentResult"/></returns> public static IPaymentResult CapturePayment(this IPayment payment, IInvoice invoice, IPaymentGatewayMethod paymentGatewayMethod, decimal amount) { return payment.CapturePayment(invoice, paymentGatewayMethod, amount, new ProcessorArgumentCollection()); }
/// <summary> /// Captures a payment for the <see cref="IInvoice"/> /// </summary> /// <param name="merchelloContext">The <see cref="IMerchelloContext"/></param> /// <param name="invoice">The invoice to be payed</param> /// <param name="payment">The</param> /// <param name="paymentMethodKey"></param> /// <param name="amount">The amount to the payment to be captured</param> /// <param name="args">Additional arguements required by the payment processor</param> /// <returns>A <see cref="IPaymentResult"/></returns> internal static IPaymentResult CapturePayment(this IPayment payment, IMerchelloContext merchelloContext, IInvoice invoice, Guid paymentMethodKey, decimal amount, ProcessorArgumentCollection args) { var paymentGatewayMethod = merchelloContext.Gateways.Payment.GetPaymentGatewayMethodByKey(paymentMethodKey); return payment.CapturePayment(invoice, paymentGatewayMethod, amount, args); }
/// <summary> /// Captures a payment for the <see cref="IInvoice"/> /// </summary> /// <param name="invoice">The invoice to be payed</param> /// <param name="payment">The</param> /// <param name="amount">The amount to the payment to be captured</param> /// <param name="paymentGatewayMethod"></param> /// <returns>A <see cref="IPaymentResult"/></returns> internal static IPaymentResult CapturePayment(this IInvoice invoice, IPayment payment, IPaymentGatewayMethod paymentGatewayMethod, decimal amount) { return invoice.CapturePayment(payment, paymentGatewayMethod, amount, new ProcessorArgumentCollection()); }
/// <summary> /// Captures a payment for the <see cref="IInvoice"/> /// </summary> /// <param name="invoice">The invoice to be payed</param> /// <param name="payment">The</param> /// <param name="paymentMethodKey"></param> /// <param name="amount">The amount to the payment to be captured</param> /// <param name="args">Additional arguements required by the payment processor</param> /// <returns>A <see cref="IPaymentResult"/></returns> public static IPaymentResult CapturePayment(this IPayment payment, IInvoice invoice, Guid paymentMethodKey, decimal amount, ProcessorArgumentCollection args) { return payment.CapturePayment(MerchelloContext.Current, invoice, paymentMethodKey, amount, args); }
/// <summary> /// Captures a payment for the <see cref="IInvoice"/> /// </summary> /// <param name="invoice">The invoice to be payed</param> /// <param name="payment">The</param> /// <param name="paymentMethodKey"></param> /// <param name="amount">The amount to the payment to be captured</param> /// <param name="args">Additional arguements required by the payment processor</param> /// <returns>A <see cref="IPaymentResult"/></returns> internal static IPaymentResult CapturePayment(this IPayment payment, IInvoice invoice,Guid paymentMethodKey, decimal amount) { return payment.CapturePayment(invoice, paymentMethodKey, amount, new ProcessorArgumentCollection()); }