yii2-currency-converter This extension will help to find out current currency conversion rate.

  1. Introduction
  2. Why Use It
  3. Requirements
  4. Installation
  5. Usage
  6. Resources

Introduction ¶

This extension will help to find out current currency conversion rate. This extension uses Yahoo's currency conversion API.

Why Use It ¶

  • Reliable Rate, Uses Yahoo API
  • Conversion without curreny code(from country code)
  • Caching of rate, to avoid connecting to Yahoo again and again ( Working on caching )

Requirements ¶

  • PHP version 5.4 or later
  • Curl Extension (Optional)
  • Yii 2.0

Installation ¶

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist imanilchaudhari/yii2-currency-converter "dev-master"

or add

"imanilchaudhari/yii2-currency-converter": "dev-master"

to the require section of your composer.json file.

Usage ¶

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

Resources ¶

0 0
2 followers
0 downloads
Yii Version: 2.0
License: MIT
Category: Web Service
Developed by: Anil Chaudhari Anil Chaudhari
Created on: Sep 10, 2015
Last updated: 10 years ago

Related Extensions