planetadeleste/bcu-currency 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

planetadeleste/bcu-currency

Composer 安装命令:

composer require planetadeleste/bcu-currency

包简介

Currency API getting from Uruguayan BCU bank

README 文档

README

Currency API from Uruguayan BCU bank

Inspired in biller/bcu package

Installation

composer require planetadeleste/bcu-currency

Usage

The main class PlanetaDelEste\BCUCurrency\Currency has three static methods, currencies(), latest(), rate(). Each one call a different Soap service, based on url https://cotizaciones.bcu.gub.uy/wscotizaciones/servlet/

Get currencies

Get a list of local or global currencies

$obCurrencies = \PlanetaDelEste\BCUCurrency\Currency::currencies();
$obResponse = $obCurrencies->local();

$arItems = $obResponse->getItems();

Methods

Name Params Return Description
get $iGroupID int CurrenciesResponse Results currencies from both markets (local and international)
both CurrenciesResponse Results currencies from both markets (local and international)
global CurrenciesResponse Results currencies from international markets only
local CurrenciesResponse Results currencies from local markets only
getItems array Return an array of items like example bellow

Response

Class \PlanetaDelEste\BCUCurrency\Service\CurrenciesResponse

Methods
Name Params Return Description
getItems array Return an array of ItemRef like example bellow
Properties

\PlanetaDelEste\BCUCurrency\Service\Currencies\ItemRef

Property Value Description
Codigo int Numeric currecy code
Nombre string Name of currency
[
  {
    "Codigo": 501,
    "Nombre": "PESO ARG.BILLETE"
  },
  {
    "Codigo": 1001,
    "Nombre": "REAL BILLETE"
  },
  {
    "Codigo": 2224,
    "Nombre": "DLS. USA CABLE"
  },
  {
    "Codigo": 2225,
    "Nombre": "DLS. USA BILLETE"
  },
  {
    "Codigo": 2230,
    "Nombre": "DLS.PROMED.FONDO"
  },
  {
    "Codigo": 9700,
    "Nombre": "UNIDAD PREVISIONAL"
  },
  {
    "Codigo": 9800,
    "Nombre": "UNIDAD INDEXADA"
  },
  {
    "Codigo": 9900,
    "Nombre": "UNIDAD REAJUSTAB"
  }
]

Get last closed

Returns the date of last rate closed

Methods

Name Params Return Description
get \PlanetaDelEste\BCUCurrency\Service\LatestResponse

Usage

$obLatest = \PlanetaDelEste\BCUCurrency\Currency::latest();
$obResponse = $obLatest->get();

$sDate = $obResponse->getFecha();
print_r($sDate);

Response

Name Params Return Description
getFecha string Get date in Y-m-d format

2021-06-17

Get rate

Get rate data of selected currency and dates

NAMESPACE \PlanetaDelEste\BCUCurrency\Service

CLASS Rate

$obLatest = \PlanetaDelEste\BCUCurrency\Currency::latest()->get();
$obRate = \PlanetaDelEste\BCUCurrency\Currency::rate();
$obLocalResponse = $obRate->local()->from($obLatest->getFecha())->usd()->get();
$obGlobalResponse = $obRate->global()->from($obLatest->getFecha())->usd()->get();


print_r($obLocalResponse->getItems());
print_r($obGlobalResponse->getItems());

Methods

Name Params Return Description
local Rate Get local currencies
global Rate Get international currencies
both Rate Get both currencies
from string Rate Set date from in Y-m-d format
to string Rate Set date to in Y-m-d format
ars bool Rate Set/add Argentine peso currency
brl bool Rate Set/add Brazilian real currency
usd bool Rate Set/add USA Dollar currency
eur bool Rate Set/add EUR currency. Only works with global currencies.
get RateResponse

Response

Return an array of \PlanetaDelEste\BCUCurrency\Service\RateResponse\ItemRef items

Property Value Description
Fecha string Date of current rate (Y-m-d)
Moneda int Currency ID
Nombre string Name of currency
CodigoISO string ISO code
Emisor string Emmiter country
TCC float Low value
TCV float High value
ArbAct float Arbitrage value
FormaArbitrar int Arbitrage format

planetadeleste/bcu-currency 适用场景与选型建议

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

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

围绕 planetadeleste/bcu-currency 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-11