loppep/peppol-directory-client 问题修复 & 功能扩展

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

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

loppep/peppol-directory-client

最新稳定版本:v1.9.0

Composer 安装命令:

composer require loppep/peppol-directory-client

包简介

An API client for the Peppol directory

README 文档

README

An API client for searching Peppol participants in the Peppol Directory.
The additional SMP check ensures that the participant is actually reachable via Peppol.
This was mainly implemented because of the following reason found in the documentation of the Peppol Directory:

A crucial governance note: updating the Directory is performed by SMP providers and is not mandatory. Therefore, a company can be fully routable on Peppol and still not appear in the public Directory. This does not invalidate their Peppol status; it only means their SMP has not published a “business card” to the Directory.

Getting started

Install our library

composer require loppep/peppol-directory-client

Install a PSR-18 library, e.g. Symfony HttpClient

composer require symfony/http-client

Install a PSR-7 library, e.g. Nyholm PSR-7

composer require nyholm/psr7

Search for a Peppol participant

This performs a search in the Peppol Directory and additionally checks the SMP.

use Http\Discovery\Psr18Client;
use Loppep\PeppolDirectoryClient\Enum\Environment;
use Loppep\PeppolDirectoryClient\PeppolDirectoryClient;

$directory = new PeppolDirectoryClient(
    new Psr18Client(),
    Environment::production()
);
$directory->search('DE343985244');

Get a Peppol participant by their ID

This bypasses the Peppol Directory and checks directly with the SMP.

use Http\Discovery\Psr18Client;
use Loppep\PeppolDirectoryClient\Data\IdType;
use Loppep\PeppolDirectoryClient\Enum\Environment;
use Loppep\PeppolDirectoryClient\PeppolDirectoryClient;

$directory = new PeppolDirectoryClient(
    new Psr18Client(),
    Environment::production()
);
$directory->get(
    new IdType(
        $scheme = 'iso6523-actorid-upis',
        $value = '9930:de343985244'
    )
);

Quickly check if a Peppol participant is registered

This bypasses the Peppol Directory and checks directly with the SMP.

use Http\Discovery\Psr18Client;
use Loppep\PeppolDirectoryClient\Data\IdType;
use Loppep\PeppolDirectoryClient\Enum\Environment;
use Loppep\PeppolDirectoryClient\PeppolDirectoryClient;

$directory = new PeppolDirectoryClient(
    new Psr18Client(),
    Environment::production()
);
$directory->isRegistered(
    new IdType(
        $scheme = 'iso6523-actorid-upis',
        $value = '9930:de343985244'
    )
);

统计信息

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

GitHub 信息

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

其他信息

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