Table of Contents

Class ConsolidatedPaymentService

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll

An abstract class for managing relationships between a consolidated payment order and the orders paid by it.

public abstract class ConsolidatedPaymentService
Inheritance
ConsolidatedPaymentService
Inherited Members

Remarks

Implementations are responsible for persisting and retrieving the association between a payment order and one or more paid orders.

Methods

Create(ConsolidatedPaymentCreationParameters)

Creates ConsolidatedPayment instances based on the given creation parameters. The payment is potentially a partial payment if previous payments already exist for the specified order. Orders with full payments are ignored.

public virtual IEnumerable<ConsolidatedPayment> Create(ConsolidatedPaymentCreationParameters parameters)

Parameters

parameters ConsolidatedPaymentCreationParameters

The parameters containing all the relevant information to create payments.

Returns

IEnumerable<ConsolidatedPayment>

A collection of ConsolidatedPayment instances representing the payments created based on the provided parameters. If no payments are created, an empty collection is returned.

DeletePayment(int)

Deletes the specified payment order and any related paid-order associations.

public abstract void DeletePayment(int paymentId)

Parameters

paymentId int

The numeric identifier of the payment order.

GetBalance(string)

Calculates the total amount paid toward a specified order, consolidating all completed payments.

public virtual ConsolidatedPaymentBalance? GetBalance(string paidOrderId)

Parameters

paidOrderId string

The unique identifier of the paid order for which to retrieve the consolidated payment balance. Cannot be null.

Returns

ConsolidatedPaymentBalance

A ConsolidatedPaymentBalance object representing the total amount paid toward the order, or null if the order does not exist.

Remarks

If no completed payments are found, the returned balance reflects the full amount remaining. If a single full payment is found, the balance indicates no amount remaining. Partial payments are aggregated to determine the total paid.

GetPaymentsByPaidOrderId(string)

Gets the consolidated payments associated with a paid order.

public abstract IEnumerable<ConsolidatedPayment> GetPaymentsByPaidOrderId(string paidOrderId)

Parameters

paidOrderId string

The ID of the paid order.

Returns

IEnumerable<ConsolidatedPayment>

A collection of ConsolidatedPayment instances.

GetPaymentsByPaymentOrderId(string)

Gets the consolidated payments associated with a payment order.

public abstract IEnumerable<ConsolidatedPayment> GetPaymentsByPaymentOrderId(string paymentOrderId)

Parameters

paymentOrderId string

The ID of the payment order.

Returns

IEnumerable<ConsolidatedPayment>

A collection of ConsolidatedPayment instances.

Save(ConsolidatedPayment)

Saves a ConsolidatedPayment instance.

public abstract void Save(ConsolidatedPayment payment)

Parameters

payment ConsolidatedPayment
To top