The GatewayProvider service allows you to get to the gateways in Merchello. Gateways.
Passed to all instantiated Gateway Providers
This class will eventually be obsoleted.
## Intantiating
[block:$textarea] { "text": "The GatewayProviderService is exposed through the `MerchelloContext`", "sidebar": true } [/block]ο»Ώ
ο»Ώ
βxvar gatewayProviderService = MerchelloContext.Current.Services.GatewayProviderService;
## Class
ο»Ώ
xxxxxxxxxx
1public class GatewayProviderService : MerchelloRepositoryService,
IGatewayProviderService, IService
## Constructors
Name | Description |
GatewayProviderService() | Initializes a new instance of the GatewayProviderService class. |
GatewayProviderService(ILogger) | Initializes a new instance of the GatewayProviderService class. |
## Public Methods
Name | Description |
ApplyPaymentToInvoice | Creates and saves an AppliedPayment |
CreateNotificationMessageWithKey | Creates a INotificationMessage and saves it to the database |
CreateNotificationMethodWithKey | Creates a INotificationMethod and saves it to the database |
CreateNotificationMethodWithKey | Creates a payment without saving it to the database |
CreatePaymentMethodWithKey | Attempts to create a IPaymentMethod for a given provider. If the provider already defines a paymentCode, the creation fails. |
CreatePaymentWithKey | Creates and saves a payment |
CreateShipMethodWithKey | Creates a IShipMethod. This is useful due to the data constraint preventing two ShipMethods being created with the same ShipCountry and ServiceCode for any provider. |
CreateTaxMethodWithKey | Attempts to create a ITaxMethod for a given provider and country. If the provider already defines a tax rate for the country, the creation fails. |
Delete(INotificationMessage) | Deletes a INotificationMessage |
Delete(INotificationMethod) | Deletes a INotificationMethod |
Delete(IPaymentMethod) | Deletes a single IPaymentMethod |
Delete(IShipMethod) | Deletes a IShipMethod |
Delete(IShipRateTier) | Deletes a IShipRateTier |
Delete(ITaxMethod) | Deletes a ITaxMethod |
Delete(IGatewayProviderSettings, Boolean) | Deletes a IGatewayProviderSettings |
GetAllGatewayProviders | Gets a collection containing all IGatewayProviderSettings |
GetAllGatewayProviders | Returns a collection of all IInvoiceStatus |
GetAllOrderStatuses | Returns a collection of all IOrderStatus |
GetAllShipCountries | Returns a collection of all IShipCountry |
GetAppliedPaymentsByInvoiceKey | Gets a collection of IAppliedPayments by the invoice key |
GetAppliedPaymentsByPaymentKey | Gets a collection of IAppliedPayments by the payment key |
GetDefaultWarehouse | Gets the default IWarehouse |
GetGatewayProviderByKey | Gets a IGatewayProviderSettings by it's unique 'Key' (Guid) |
GetGatewayProvidersByShipCountry | Gets a collection of IGatewayProviderSettings by ship country |
GetGatewayProvidersByType | Gets a collection of IGatewayProviderSettings by its type (Shipping, Taxation, Payment) |
GetNotificationMessageByKey | Gets a INotificationMethod by it's unique key(Guid) |
GetNotificationMessageByKey | Gets a collection of INotificationMessages based on a monitor key |
GetNotificationMessagesByMonitorKey | Gets a collection of INotificationMessages based on a monitor key |
GetNotificationMethodsByProviderKey | Gets a collection of INotificationMethod for a give NotificationGatewayProvider |
GetPaymentMethodsByProviderKey | Gets a collection of IPaymentMethod for a given PaymentGatewayProvider |
GetPaymentsForInvoice | Gets a collection of IPayment for a given invoice |
GetShipCountry | Gets a IShipCountry by CatalogKey and CountryCode |
GetShipCountryByKey | Gets a IShipCountry by it's unique key (Guid) |
GetShipMethodByKey | Gets a IShipMethod by it's unique key |
GetShipMethodsByShipCountryKey(Guid) | Gets a list of all IShipMethod objects given a IGatewayProviderSettings key |
GetShipMethodsByShipCountryKey(Guid, Guid) | Gets a list of IShipMethod objects given a IGatewayProviderSettings key and a IShipCountry key |
GetShipRateTiersByShipMethodKey | Gets a list of IShipRateTier objects given a IShipMethod key |
GetTaxMethodByCountryCode | Gets a ITaxMethod based on a provider and country code |
GetTaxMethodForProductPricing | Get tax method for product pricing. |
GetTaxMethodsByCountryCode | Gets a ITaxMethod based on a provider and country code |
GetTaxMethodsByProviderKey | Gets a collection of ITaxMethod for a given TaxationGatewayProvider |
Save(IAppliedPayment) | Saves a single IAppliedPayme |
Save(IInvoice) | Saves a single IInvoice |
Save(INotificationMessage) | Saves a INotificationMessage |
Save(INotificationMessage) | Saves a INotificationMethod |
Save(IPayment) | Saves a single IPayment |
Save(IPaymentMethod) | Saves a single IPaymentMethod |
Save(IShipMethod) | Saves a single IShipMethod |
Save(IEnumerable(IShipMethod)) | Saves a collection of IShipMethod |
Save(IShipRateTier) | Saves a single IShipRateTier |
Save(IShipRateTier) | Saves a collection of IShipRateTier |
Save(ITaxMethod) | Saves a single ITaxMethod |
Save(IGatewayProviderSettings, Boolean) | Saves a single instance of a IGatewayProviderSettings |
## Events
Name | Description |
Deleting | Occurs before delete |
Deleted | Occurs after delete |
Saving | Occurs before saving |
Saved | Occurs after saved |
GatewayProviderSerivce
Events associated with the GatewayProviderService are only fired for methods associated with `
IGatewayProviderSettings
`
## Interface on GitHub
ο»Ώ[https://github.com/Merchello/Merchello/blob/master/src/Merchello.Core/Services/Interfaces/IGatewayProviderService.cs](πο»Ώ)ο»Ώ