RequestCurrencyProvider class
The role of the request currency provider is to provide currency context in all Commerce Connect API calls. Sitecore.Commerce.Config contains an interface definition and default request currency provider. The default implementation returns NULL, meaning no currency has been provided.
TheSitecore.Commerce.Config file defines the following currency provider configuration:
<requestCurrencyCodeProvider type="Sitecore.Commerce.Providers.RequestCurrencyProvider, Sitecore.Commerce.Connect.Core" singleInstance="true"/>A request currency provider implements the IRequestCurrencyProvider interface. You must implement the GetCurrencyCode() method.
|
Name |
Description |
|
|
Returns the currency code selected for the current shop. |
The base ServiceProviderRequest class exposes a CurrencyCode property and is populated by calling the configured service provider method.
Because every service request populates the CurrencyCode property information, the information is available from any Commerce API request.
