Class PaymentPlanProvider
Provider for Payment
Inheritance
Namespace: EPiServer.Commerce.Order.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public class PaymentPlanProvider : Object, IPaymentPlanProvider, IOrderProvider<IPaymentPlan>
Constructors
PaymentPlanProvider(ICurrentMarket, IOrderGroupCalculator, ReferenceConverter, IContentLoader, ICatalogSystem, IRelationRepository, ServiceAccessor<SiteContext>, IContentLanguageAccessor, CustomerContext, ISiteDefinitionResolver, IRequestHostResolver)
Creates an instance of Payment
Declaration
public PaymentPlanProvider(ICurrentMarket currentMarket, IOrderGroupCalculator orderGroupCalculator, ReferenceConverter referenceConverter, IContentLoader contentLoader, ICatalogSystem catalogSystem, IRelationRepository relationRepository, ServiceAccessor<SiteContext> siteContextAccessor, IContentLanguageAccessor languageResolver, CustomerContext customerContext, ISiteDefinitionResolver siteDefinitionResolver, IRequestHostResolver requestHostResolver)
Parameters
Type | Name | Description |
---|---|---|
ICurrent |
currentMarket | The current market service |
IOrder |
orderGroupCalculator | The calculator that used to calculate the totals for an order group. |
Reference |
referenceConverter | The reference converter. |
EPi |
contentLoader | The content loader. |
ICatalog |
catalogSystem | The catalog system. |
IRelation |
relationRepository | The relation repository. |
EPi |
siteContextAccessor | The site context accessor. |
EPi |
languageResolver | The language resolved. |
Customer |
customerContext | The customer context. |
EPi |
siteDefinitionResolver | The site definition resolover |
EPi |
requestHostResolver | The rwquest host resolver |
Methods
Create(Guid, String)
Creates an IPayment
Declaration
public IPaymentPlan Create(Guid customerId, string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
customerId | The customer id |
System. |
name | The order name |
Returns
Type | Description |
---|---|
IPayment |
An IPayment |
Delete(OrderReference)
Deletes an order using an order reference.
Declaration
public void Delete(OrderReference orderLink)
Parameters
Type | Name | Description |
---|---|---|
Order |
orderLink | The order link. |
Load(Guid, String)
Loads payment plans.
Declaration
public IEnumerable<IPaymentPlan> Load(Guid customerId, string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
customerId | The customer id. |
System. |
name | The name of the order. The name is not unique for each order, instead it's suppose to differentiate orders of the same type. |
Returns
Type | Description |
---|---|
System. |
The System.Collections.Generic.IEnumerable<>. |
Remarks
If the name
is null or empty, it returns all payment plans of the customer.
Load(Int32)
Loads the order
Declaration
public IPaymentPlan Load(int orderGroupId)
Parameters
Type | Name | Description |
---|---|---|
System. |
orderGroupId | The order group id |
Returns
Type | Description |
---|---|
IPayment |
The IPayment |
Save(IPaymentPlan)
Saves the specified IPayment
Declaration
public OrderReference Save(IPaymentPlan paymentPlan)
Parameters
Type | Name | Description |
---|---|---|
IPayment |
paymentPlan | The payment plan. |
Returns
Type | Description |
---|---|
Order |
An Order |
SaveAsPurchaseOrder(IPaymentPlan)
Declaration
public IPurchaseOrder SaveAsPurchaseOrder(IPaymentPlan paymentPlan)
Parameters
Type | Name | Description |
---|---|---|
IPayment |
paymentPlan |
Returns
Type | Description |
---|---|
IPurchase |