oxcom / magento2-currency-services
This is a module that allows to update currency rates from addition external sources.
Magento2 Currency Services
This is a module that allows to update currency rates from addition external sources.
List of source services
Notes
-
Fixer
[The old, deprecated Fixer API will be discontinued on June 1st, 2018] We are happy to announce the complete relaunch of fixer.io into a more stable, more secure, and much more advanced currency & exchange rate conversion API platform. While the core structure of our API remains unchanged, all users of the legacy Fixer API will be required to sign up for a free API access key and perform a few simple changes to their integration. To learn more about the changes that are required.Be aware that free access to Fixer API has limited functionality.
You can setup Access Token for Fixer API in your administration panel
for Magento. -
Google Finance
Google does not provide a public currency-rates API. This integration parses
the requested currency pair from the Google Finance quote page.Be aware that Google may change its HTML structure at any time.
-
European Central Bank
The reference rates are usually updated around 16:00 CET on every working day, except on TARGET closing days. They are based on a regular daily concertation procedure between central banks across Europe, which normally takes place at 14:15 CET.Be aware about low refresh rate
-
Bank of Canada
The keyless Valet API publishes indicative business-daily rates for selected
currencies. Rates are based on Canadian dollars and are normally published
by 16:30 ET.
Install
$ composer require oxcom/magento2-currency-services
$ bin/magento module:enable OxCom_MagentoCurrencyServices
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
CLI commands
Rates can be imported manually per source, without waiting for cron or using
the admin panel:
$ bin/magento oxcom:importrates:ecb
$ bin/magento oxcom:importrates:fixer
$ bin/magento oxcom:importrates:google
Each command fetches rates from the given source and saves them, same as
admin System > Currency Rates > Import Now. Non-zero exit code + error
output if a rate can't be retrieved.
Commands are registered via DI, so after install run setup:upgrade (and
setup:di:compile in production mode) / flush cache before they show up in
bin/magento list.
Tests
Tests use local fixtures by default, so the regular suite does not require
network access:
$ composer install
$ vendor/bin/phpunit -c Test/phpunit.xml --no-coverage
Set CURRENCY_SERVICES_LIVE_TESTS=1 and FIXER_FREE_TOKEN to check the live
provider services. GitHub Actions runs that live suite against master every
Monday and Friday at 06:00 UTC.
Composer scripts are available for all checks:
$ composer cs # phpcs (PSR-12 + Slevomat)
$ composer stan # phpstan analyse
$ composer test # phpunit (no coverage)
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 2.1.3 | stable | Fail | Magento 2.4.7-2.4.8 Details | 2026-10-29 21:33:03 |
| 2.1.2 | stable | Not tested | Not yet tested Details | 2026-10-29 21:09:08 |
| 2.1.1 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-08-19 11:16:00 |
| 2.1.0 | stable | Fail | Magento 2.4.7-2.4.9 Details | 2026-07-15 12:08:17 |
| 2.0.1 | stable | Not tested | Not yet tested Details | 2023-05-08 07:41:21 |
| 2.0.0 | stable | Not tested | Not yet tested Details | 2021-01-11 12:21:08 |
| 1.1.0 | stable | Not tested | Not yet tested Details | 2020-07-02 09:51:37 |
| 1.0.6 | stable | Not tested | Not yet tested Details | 2019-04-04 16:55:07 |
| 1.0.5 | stable | Not tested | Not yet tested Details | 2018-06-19 10:28:18 |
| 1.0.3 | stable | Not tested | Not yet tested Details | 2018-05-10 10:39:45 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2018-03-22 15:09:05 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2017-11-22 21:44:01 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2017-10-25 10:57:43 |
Requires 11
| Package | Constraint |
|---|---|
| ext-bcmath | * |
| ext-curl | * |
| ext-json | * |
| ext-simplexml | * |
| magento/framework | ^103.0 |
| magento/module-backend | 100.0.*|100.1.*|100.2.*|101.0.*|102.0.*|103.0.* |
| magento/module-config | 100.0.*|100.1.*|101.0.*|101.1.*|101.2.* |
| magento/module-directory | 100.0.*|100.1.*|100.2.*|100.3.*|100.4.* |
| magento/module-store | 100.0.*|100.1.*|100.2.*|101.0.*|101.1.* |
| php | >=7.1 |
| psr/log | ^1.1|^2.0|^3.0 |
Requires-dev 5
| Package | Constraint |
|---|---|
| dealerdirect/phpcodesniffer-composer-installer | ^1.0 |
| phpstan/phpstan | ^2.1 |
| phpunit/phpunit | ^10.5 || ^11.5 |
| slevomat/coding-standard | ^8.16 |
| squizlabs/php_codesniffer | ^3.13 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 35 | 35 warnings (ruleset: Magento2), 25 auto-fixable with phpcbf |
| PHPMD | Warning | 24 | 24 rule violations (MissingImport:17, UnusedFormalParameter:2, CyclomaticComplexity:2, NPathComplexity:2, TooManyPublicMethods:1) |
| Cpd | Pass | 0 | |
| Composer validate | Pass | 0 |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from oxcom
View vendorTurn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.