承接 peso/peso-exchanger-interop 相关项目开发

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

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

peso/peso-exchanger-interop

最新稳定版本:1.1.0

Composer 安装命令:

composer require peso/peso-exchanger-interop

包简介

Interoperability package for Peso and Exchanger (and Swap)

README 文档

README

Packagist PHP License GitHub Actions Codecov

Peso Framework interoperability package for Exchanger and Swap.

Installation

composer require peso/peso-exchanger-interop

Example

Peso services in Exchanger:

<?php

use Exchanger\Exchanger;
use Exchanger\ExchangeRateQueryBuilder;
use Peso\Interop\Exchanger\ExchangerService;
use Peso\Services\EuropeanCentralBankService;

$service = new ExchangerService(new EuropeanCentralBankService());
$exchanger = new Exchanger($service);

$query = (new ExchangeRateQueryBuilder('EUR/USD'))
    ->setDate(new DateTimeImmutable('2025-06-13'))
    ->build();

$rate = $exchanger->getExchangeRate($query);

echo $rate->getValue(), PHP_EOL; // 1.1512

Exchanger services in Peso:

<?php

use Exchanger\Service\EuropeanCentralBank;
use Peso\Interop\Exchanger\PesoService;
use Peso\Peso\CurrencyConverter;

$service = new PesoService(new EuropeanCentralBank());
$peso = new CurrencyConverter($service);

// 1.1512
echo $peso->getHistoricalConversionRate('EUR', 'USD', '2025-06-13'), PHP_EOL;

Documentation

Read the full documentation here: https://phpeso.org/v1.x/interop/exchanger.html

Support

Please file issues on our main repo at GitHub: https://github.com/phpeso/peso-exchanger-interop/issues

License

The library is available as open source under the terms of the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-06-14