This extension will help to find out current currency conversion rate. This extension uses Yahoo's currency conversion API.
The preferred way to install this extension is through composer.
php composer.phar require --prefer-dist imanilchaudhari/yii2-currency-converter "dev-master"
to the require section of your
Once the extension is installed, simply use it in your code by :
use imanilchaudhari\CurrencyConverter\CurrencyConverter; $converter = new CurrencyConverter(); $rate = $converter->convert('USD', 'NPR'); print_r($rate); // it will print current Nepalese currency (NPR) rate according to USD