#SilverStripe Currency Converter
Simple service for converting currencies for SilverStripe 4+
Full credits go to: webtorque7. I've
merely upgraded the module to be compatible with SilverStripe 4+ and made a few slight improvements.
composer require webtorque/currency-converter
To convert $99.99 NZD to USD
$convertedAmount = CurrencyConverter::get_converter()->convert(99.99, 'NZD', 'USD');
Default implementation uses an xml feed at http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml. Other sources and be
created by inheriting from CurrencyConverter and implementing the retrieveCurrencies function.
Then change the
converter config option on CurrencyConverter e.g.
Zanderwar\CurrencyConverter\CurrencyConverter: converter: MyCurrencyConverter
Alternatively, you can pass the name of the class into get_converter e.g.
$convertedAmount = CurrencyConverter::getConverter(MyCurrencyConverter::class)->convert(9999, 'NZD', 'USD');
Module rating system helping users find modules that are well supported. For more on how the rating system works visit Module standards
Score not correct? Let us know there is a problem