The In-Commerce has ability to update currency rates from these sources:
- Federal Reserve Bank of New York
- European Central Bank
- Bank of Latvia
Turns out, that:
- URL used to retrieve currency rates for "European Central Bank" (used to be: http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml) now redirects to http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml. But we're not following that redirected url and instead getting empty rates document.
- The URL used to retrieve currency rates for "Bank of Latvia" returns 404 page (not found) probably because Latvia is now part of EU and EU bank rates should be used
- The URL used to retrieve currency rates for "Federal Reserve Bank of New York" returns 404 page (not found)
Solution
During currency processing in sub-classes of "kCurrencyRates" class:
- enable "follow location" option during curl request
- when CURL error happened or we've got empty document instead of XML don't attempt to parse it
- change URL for "European Central Bank" to one where redirect happens