maguru/module-mono-core 问题修复 & 功能扩展

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

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

maguru/module-mono-core

Composer 安装命令:

composer require maguru/module-mono-core

包简介

Monobank Integration Core Module for Magento 2 — HTTP client, config, ECDSA webhook verification

README 文档

README

Magento 2 Stable Version Total Downloads License

FREE infrastructure module. Provides the shared HTTP clients, encrypted configuration, ECDSA webhook verification, and exception hierarchy used by all other MaGuru Monobank modules.

Requirements

Component Version
Magento Open Source / Adobe Commerce 2.4.4+
PHP 8.1–8.5
MaGuru_Core ^1.0.1
ext-openssl any
ext-json any
guzzlehttp/guzzle ^7.5

Installation

composer require maguru/module-mono-core
bin/magento module:enable MaGuru_MonoCore
bin/magento setup:upgrade
bin/magento cache:flush

Configuration

Stores → Configuration → MaGuru → Monobank Integration

Field Description
Enabled Enable/disable the integration
Acquiring API Token Your Monobank merchant X-Token (encrypted)
Chast Store ID Store ID for Monobank Частини API
Chast Secret HMAC-SHA256 secret for Chast callbacks (encrypted)
HTTP Timeout Guzzle request timeout in seconds (default: 15)
Connect Timeout TCP connect timeout in seconds (default: 5)
Debug Logging Write detailed request/response logs to var/log/mono_core.log

Features

  • AcquiringClient — Guzzle HTTP client for api.monobank.ua with X-Token auth and error mapping (403→AuthException, 404→NotFoundException, 429→RateLimitException, 500→ApiException)
  • ChastClient — Guzzle HTTP client for Monobank Частини API with HMAC-SHA256 signature header
  • WebhookVerifier — ECDSA P-256 / SHA-256 verification of X-Sign webhook signatures with pubkey caching and auto-retry on key rotation
  • CLIbin/magento mono:acquiring:validate-token to verify your API token
  • Exception hierarchyApiException, AuthException, RateLimitException, NotFoundException

Developer Notes

This module provides interfaces only — no UI, no payment method.

Other modules interact via:

// In di.xml
<preference for="MaGuru\MonoCore\Api\AcquiringClientInterface"
            type="MaGuru\MonoCore\Model\Client\AcquiringClient"/>

Inject AcquiringClientInterface or ChastClientInterface in your service — never instantiate clients directly.

Tests

bin/clinotty php vendor/bin/phpunit -c app/code/MaGuru/MonoCore/Test/Unit/phpunit.xml

57 unit tests · PHPStan Level 8 ✅

Support

License

Free to use. See LICENSE.txt for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-06-26