PaymentService
Documentation for Merch's PaymentService
The Payment service is used manage payments.
The PaymentService is exposed through the
MerchelloContext
var paymentService = MerchelloContext.Current.Services.PaymentService;
Class
public class PaymentService : MerchelloRepositoryService,
IPaymentService, IService
Constructors
Name | Description |
---|---|
PaymentService() | Initializes a new instance of the PaymentService class. |
PaymentService(ILogger) | Initializes a new instance of the PaymentService class. |
Public Methods
Name | Description |
---|---|
ApplyPaymentToInvoice | Creates and saves an AppliedPayment |
CreatePayment | Creates a payment without saving it to the database |
CreatePaymentWithKey(PaymentMethodType, Decimal, Nullable(Guid), Boolean) | Creates and saves a payment |
Delete(IAppliedPayment, Boolean) | Deletes a IAppliedPayment |
Delete(IEnumerable(IAppliedPayment), Boolean) | Deletes a collection of IAppliedPayment |
Delete(IPayment, Boolean) | Deletes a single IPayment |
Delete(IEnumerable(IPayment), Boolean) | Deletes a collection of IPayment |
GetAppliedPaymentsByInvoiceKey | Gets a collection of IAppliedPayments by the invoice key |
GetAppliedPaymentsByPaymentKey | Gets a collection of IAppliedPayments by the payment key |
GetByKey | Gets a IPayment |
GetByKeys | Gets list of IProduct objects given a list of Unique keys |
GetPaymentsByCustomerKey | Gets a collection of IPayment by customer key. |
GetPaymentsByInvoiceKey | Gets a collection of IPayment for a given invoice |
GetPaymentsByPaymentMethodKey | Gets a collection of IPayment for a given PaymentGatewayProvider |
Save(IAppliedPayment, Boolean) | Saves an IAppliedPayment |
Save(IAppliedPayment, Boolean) | Saves a single IPaymentMethod |
Save(IEnumerable(IPayment), Boolean) | Saves a collection of IPayment |
Events
Name | Description |
---|---|
Creating | Occurs before create |
Created | Occurs after create |
Deleting | Occurs before delete |
Deleted | Occurs after delete |
Saving | Occurs before save |
Saved | Occurs after save |
Interface on GitHub
Updated less than a minute ago