Class OrderService
Note
For comments, please see IOrderService
public class OrderService : ServiceBase<Order>, IOrderService, IService<Order>
- Inheritance
-
OrderService
- Implements
- Inherited Members
Constructors
OrderService(IEFCoreScopeProvider<CommerceDbContext>, IPaymentProcessorService, IPaymentMethodService, IHttpContextAccessor, IProductStore, INotificationService, ILogger<OrderService>)
public OrderService(IEFCoreScopeProvider<CommerceDbContext> efCoreScopeProvider, IPaymentProcessorService paymentProcessorService, IPaymentMethodService paymentMethodService, IHttpContextAccessor httpContextAccessor, IProductStore productStore, INotificationService notificationService, ILogger<OrderService> logger)
Parameters
efCoreScopeProvider
IEFCoreScopeProvider<CommerceDbContext>paymentProcessorService
IPaymentProcessorServicepaymentMethodService
IPaymentMethodServicehttpContextAccessor
IHttpContextAccessorproductStore
IProductStorenotificationService
INotificationServicelogger
ILogger<OrderService>
Methods
CapturePayment(Order)
public Task<CapturePaymentResult?> CapturePayment(Order order)
Parameters
order
Order
Returns
Delete(Guid)
public override Task Delete(Guid id)
Parameters
id
Guid
Returns
Get(Guid)
public override Task<Order> Get(Guid id)
Parameters
id
Guid
Returns
GetByNumber(string)
public Task<Order> GetByNumber(string orderNumber)
Parameters
orderNumber
string
Returns
GetPage(int, string, SortOrder, string?, PaymentStatus?)
public Task<PaginatedResponse<Order>> GetPage(int page, string filter, SortOrder sortOrder = SortOrder.DESC, string? sortBy = null, PaymentStatus? paymentStatus = null)
Parameters
page
intfilter
stringsortOrder
SortOrdersortBy
stringpaymentStatus
PaymentStatus?
Returns
LogPayment(Order, OrderPaymentLogType, string, decimal, string?)
protected Task LogPayment(Order order, OrderPaymentLogType logType, string externalID, decimal payment, string? message = null)
Parameters
order
OrderlogType
OrderPaymentLogTypeexternalID
stringpayment
decimalmessage
string
Returns
RetryPayment(Order, IPublishedContent)
public Task<InitiatePaymentResult> RetryPayment(Order basket, IPublishedContent confirmationPage)
Parameters
basket
OrderconfirmationPage
IPublishedContent
Returns
SaveAdditionalData(Order)
public Task SaveAdditionalData(Order order)
Parameters
order
Order
Returns
Update(Order)
public override Task<IEnumerable<string>> Update(Order entity)
Parameters
entity
Order