承接 houseofapis/magento2-currencyapi-importer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

houseofapis/magento2-currencyapi-importer

Composer 安装命令:

composer require houseofapis/magento2-currencyapi-importer

包简介

Magento 2 Currency Exchange Rate Importer for CurrencyApi.net - Real-time currency rates with automatic updates

README 文档

README

A Magento 2 extension that integrates with CurrencyApi.net to provide real-time currency exchange rates. A great alternative to Fixer.io.

Features

  • Real-time currency exchange rates from CurrencyApi.net
  • Easy configuration through Magento admin
  • Support for all major currencies
  • Automatic rate updates via cron
  • Secure API key storage
  • Error handling and retry logic
  • Comprehensive unit test coverage
  • Docker-based development environment

Installation

Method 1: Composer from Packagist (Recommended)

composer require houseofapis/magento2-currencyapi-importer

Method 2: Composer from Magento Marketplace

  1. Get your extension information:

    • Log in to Commerce Marketplace with your account
    • Click Your name > My Profile
    • Click My Purchases
    • Find the extension and note the component name and version
  2. Ensure your composer.json includes the Magento repository:

    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ]
  3. Install the extension with the specific version:

    composer require houseofapis/magento2-currencyapi-importer:1.0.0
  4. Enter your authentication keys when prompted (your public key is your username; your private key is your password)

Method 3: Manual Installation

  1. Download the extension files
  2. Copy to app/code/HouseOfApis/CurrencyApi/

Post-Installation Steps

After installing using any method above, run these commands:

# Enable the module
php bin/magento module:enable HouseOfApis_CurrencyApi

# Update the database schema
php bin/magento setup:upgrade

# Compile dependency injection
php bin/magento setup:di:compile

# Verify the module is enabled
php bin/magento module:status HouseOfApis_CurrencyApi

# Clean the cache
php bin/magento cache:clean

Note: If you encounter any issues loading the storefront, run php bin/magento cache:flush to completely flush all caches.

API Key

You need an API key to use this extension.

Get your API key by creating a free account at CurrencyApi.net:

  • Free plan: USD base currency only
  • Paid plans: Required to change the base currency (for example to EUR, GBP, etc.)

Configuration

Add Magento Api Key

  1. Go to Stores > Configuration > General > Currency Setup
  2. Select CurrencyApi.net
  3. Enter your API key from CurrencyApi.net
  4. Configure connection timeout if needed
  5. Save configuration

Importing Currency Rates

Select CurrencyApi.net import service

  1. Go to Stores > Currency Rates
  2. Click Import Service and select CurrencyApi.net
  3. Click the Import button

Save Imported Currencies

  1. The new rates will now be imported
  2. Click Save Currency Rates to apply

Requirements

  • Magento 2.4.0 or higher
  • PHP 8.1 or higher
  • Valid CurrencyApi.net API key
  • cURL extension enabled

Magento Version Compatibility

Magento Version Extension Version Status
2.4.0 - 2.4.7 1.0.0 ✅ Supported
2.4.8+ 1.0.0 ✅ Supported

Currency List

We supply up to 152 fiat currencies, cryptos and precious metals.

By default, Magento does not support cryptos and precious metals and there maybe some old currencies that are available on Magento but not available from our API.

For a full list of the currencies we supply, head over to our currency list page.

Development

Running Tests

This extension includes comprehensive unit tests. You can run them using Docker:

# Run all tests
make test

# Run tests with verbose output
make test-verbose

# Run tests with coverage report
make test-coverage

# Run specific test file
make test-specific

# Clean up Docker resources
make clean

Test Structure

  • Test/Unit/ - Unit tests with mocked dependencies
  • Test/Fixtures/ - JSON fixtures for API responses
  • Test/Stubs/ - Magento interface stubs for testing
  • Tests cover API integration, error handling, and configuration parsing

Project Structure

├── Model/Currency/Import/
│   └── CurrencyApi.php          # Main import service
├── Test/
│   ├── Unit/                    # Unit tests
│   ├── Fixtures/                # Test data
│   └── Stubs/                   # Magento stubs
├── composer.json                # Package definition
├── registration.php             # Magento module registration
└── README.md                    # This file

Troubleshooting

Common Issues

Currency rates not updating:

  • Verify your API key is correct
  • Check if cron jobs are running
  • Ensure your server can reach currencyapi.net

"No API Key was specified" error:

  • Go to Stores > Configuration > Currency > Currency Rates
  • Select "CurrencyApi.net" as import service
  • Enter your API key and save

Test failures:

  • Run make test to verify all tests pass
  • Check Docker is running if using containerized tests

Support

For support and questions, please contact:

License

MIT License - see LICENSE file for details.

houseofapis/magento2-currencyapi-importer 适用场景与选型建议

houseofapis/magento2-currencyapi-importer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 10 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「ecommerce」 「currency」 「magento」 「forex」 「currency-converter」 「exchange-rates」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 houseofapis/magento2-currencyapi-importer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 houseofapis/magento2-currencyapi-importer 我们能提供哪些服务?
定制开发 / 二次开发

基于 houseofapis/magento2-currencyapi-importer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 31
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-02