示例#1
0
 /// <summary>
 /// Refunds a payment
 /// </summary>
 /// <param name="invoice">The invoice to be the payment was applied</param>
 /// <param name="payment">The payment to be refunded</param>
 /// <param name="paymentGatewayMethod">The <see cref="IPaymentGatewayMethod"/></param>
 /// <param name="amount">The amount to be refunded</param>
 /// <param name="args">Additional arguements required by the payment processor</param>
 /// <returns>A <see cref="IPaymentResult"/></returns>
 public static IPaymentResult RefundPayment(this IInvoice invoice, IPayment payment,
                                            IPaymentGatewayMethod paymentGatewayMethod, decimal amount, ProcessorArgumentCollection args)
 {
     return(paymentGatewayMethod.RefundPayment(invoice, payment, amount, args));
 }
 /// <summary>
 /// Performs a refund payment
 /// </summary>
 /// <returns></returns>
 public IPaymentResult Refund()
 {
     return(!IsReady() || _payment == null
         ? GetFailedResult()
         : _paymentGatewayMethod.RefundPayment(_invoice, _payment, _amount, _args));
 }
示例#3
0
 /// <summary>
 /// Refunds a payment
 /// </summary>
 /// <param name="invoice">The invoice to be the payment was applied</param>
 /// <param name="payment">The payment to be refunded</param>
 /// <param name="paymentGatewayMethod">The <see cref="IPaymentGatewayMethod"/></param>
 /// <param name="amount">The amount to be refunded</param>
 /// <param name="args">Additional arguements required by the payment processor</param>
 /// <returns>A <see cref="IPaymentResult"/></returns>
 public static IPaymentResult RefundPayment(this IPayment payment, IInvoice invoice, IPaymentGatewayMethod paymentGatewayMethod, decimal amount, ProcessorArgumentCollection args)
 {
     return paymentGatewayMethod.RefundPayment(invoice, payment, amount, args);
 }
示例#4
0
 /// <summary>
 /// Refunds a payment
 /// </summary>
 /// <param name="invoice">The invoice to be the payment was applied</param>
 /// <param name="payment">The payment to be refunded</param>
 /// <param name="paymentGatewayMethod">The <see cref="IPaymentGatewayMethod"/></param>
 /// <param name="args">Additional arguements required by the payment processor</param>
 /// <returns>A <see cref="IPaymentResult"/></returns>
 internal static IPaymentResult RefundPayment(this IInvoice invoice, IPayment payment,
     IPaymentGatewayMethod paymentGatewayMethod, ProcessorArgumentCollection args)
 {
     return paymentGatewayMethod.RefundPayment(invoice, payment, args);
 }