Table of Contents

Class OrderService

Namespace
Rescope.Commerce.Core.Services
Assembly
Rescope.Commerce.Core.dll
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 IPaymentProcessorService
paymentMethodService IPaymentMethodService
httpContextAccessor IHttpContextAccessor
productStore IProductStore
notificationService INotificationService
logger ILogger<OrderService>

Methods

CapturePayment(Order)

public Task<CapturePaymentResult?> CapturePayment(Order order)

Parameters

order Order

Returns

Task<CapturePaymentResult>

Delete(Guid)

public override Task Delete(Guid id)

Parameters

id Guid

Returns

Task

Get(Guid)

public override Task<Order> Get(Guid id)

Parameters

id Guid

Returns

Task<Order>

GetByNumber(string)

public Task<Order> GetByNumber(string orderNumber)

Parameters

orderNumber string

Returns

Task<Order>

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 int
filter string
sortOrder SortOrder
sortBy string
paymentStatus PaymentStatus?

Returns

Task<PaginatedResponse<Order>>

LogPayment(Order, OrderPaymentLogType, string, decimal, string?)

protected Task LogPayment(Order order, OrderPaymentLogType logType, string externalID, decimal payment, string? message = null)

Parameters

order Order
logType OrderPaymentLogType
externalID string
payment decimal
message string

Returns

Task

RetryPayment(Order, IPublishedContent)

public Task<InitiatePaymentResult> RetryPayment(Order basket, IPublishedContent confirmationPage)

Parameters

basket Order
confirmationPage IPublishedContent

Returns

Task<InitiatePaymentResult>

SaveAdditionalData(Order)

public Task SaveAdditionalData(Order order)

Parameters

order Order

Returns

Task

Update(Order)

public override Task<IEnumerable<string>> Update(Order entity)

Parameters

entity Order

Returns

Task<IEnumerable<string>>