Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

IPaymentMethod.cs

using Microsoft.AspNetCore.Http;
using Nop.Core.Domain.Orders;
using Nop.Services.Plugins;

namespace Nop.Services.Payments;

/// 
/// Provides an interface for creating payment gateways and methods
/// 
public partial interface IPaymentMethod : IPlugin
{
    #region Methods

    /// 
    /// Process a payment
    /// 
    /// Payment info required for an order processing
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the process payment result
    /// 
    Task ProcessPaymentAsync(ProcessPaymentRequest processPaymentRequest);

    /// 
    /// Post process payment (used by payment gateways that require redirecting to a third-party URL)
    /// 
    /// Payment info required for an order processing
    /// A task that represents the asynchronous operation
    Task PostProcessPaymentAsync(PostProcessPaymentRequest postProcessPaymentRequest);

    /// 
    /// Returns a value indicating whether payment method should be hidden during checkout
    /// 
    /// Shopping cart
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains true - hide; false - display.
    /// 
    Task HidePaymentMethodAsync(IList cart);

    /// 
    /// Gets additional handling fee
    /// 
    /// Shopping cart
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the additional handling fee
    /// 
    Task GetAdditionalHandlingFeeAsync(IList cart);

    /// 
    /// Captures payment
    /// 
    /// Capture payment request
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the capture payment result
    /// 
    Task CaptureAsync(CapturePaymentRequest capturePaymentRequest);

    /// 
    /// Refunds a payment
    /// 
    /// Request
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task RefundAsync(RefundPaymentRequest refundPaymentRequest);

    /// 
    /// Voids a payment
    /// 
    /// Request
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task VoidAsync(VoidPaymentRequest voidPaymentRequest);

    /// 
    /// Process recurring payment
    /// 
    /// Payment info required for an order processing
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the process payment result
    /// 
    Task ProcessRecurringPaymentAsync(ProcessPaymentRequest processPaymentRequest);

    /// 
    /// Cancels a recurring payment
    /// 
    /// Request
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task CancelRecurringPaymentAsync(CancelRecurringPaymentRequest cancelPaymentRequest);

    /// 
    /// Gets a value indicating whether customers can complete a payment after order is placed but not completed (for redirection payment methods)
    /// 
    /// Order
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task CanRePostProcessPaymentAsync(Order order);

    /// 
    /// Validate payment form
    /// 
    /// The parsed form values
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the list of validating errors
    /// 
    Task> ValidatePaymentFormAsync(IFormCollection form);

    /// 
    /// Get payment information
    /// 
    /// The parsed form values
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the payment info holder
    /// 
    Task GetPaymentInfoAsync(IFormCollection form);

    /// 
    /// Gets a type of a view component for displaying plugin in public store ("payment info" checkout step)
    /// 
    /// View component type
    Type GetPublicViewComponent();

    /// 
    /// Gets a payment method description that will be displayed on checkout pages in the public store
    /// 
    /// A task that represents the asynchronous operation
    Task GetPaymentMethodDescriptionAsync();

    #endregion

    #region Properties

    /// 
    /// Gets a value indicating whether capture is supported
    /// 
    bool SupportCapture { get; }

    /// 
    /// Gets a value indicating whether partial refund is supported
    /// 
    bool SupportPartiallyRefund { get; }

    /// 
    /// Gets a value indicating whether refund is supported
    /// 
    bool SupportRefund { get; }

    /// 
    /// Gets a value indicating whether void is supported
    /// 
    bool SupportVoid { get; }

    /// 
    /// Gets a recurring payment type of payment method
    /// 
    RecurringPaymentType RecurringPaymentType { get; }

    /// 
    /// Gets a payment method type
    /// 
    PaymentMethodType PaymentMethodType { get; }

    /// 
    /// Gets a value indicating whether we should display a payment information page for this plugin
    /// 
    bool SkipPaymentInfo { get; }

    #endregion
}