dexes/clearing-sdk

Dexes 包提供用于与 Clearing 组件交互的 SDK。

0.5.0 2024-09-03 13:29 UTC

This package is auto-updated.

Last update: 2024-09-03 13:36:46 UTC


README

gitlab.com/dexes.eu/clearing-sdk

Dexes 包提供用于与 Clearing 组件 交互的 SDK。

许可证

查看 LICENSE.md 文件以获取许可详情。

安装

安装...

composer require dexes/catalog-sdk

用法

Laravel

将以下代码添加到 AppServiceProvider。

$this->app->bind(HttpRequestService::class, function() {
    return new HttpRequestService(
        'https://policystore.dev.dexes.eu',
        $this->app->make(ClientInterface::class),
        $this->app->make(RequestFactoryInterface::class),
        $this->app->make(StreamFactoryInterface::class),
    );
});

$this->app->bind(AuthRepository::class, function() {
    return new AuthRepository(
        $this->app->make(HttpRequestService::class),
        config('services.ishare.satellites.DMI.x5c'),
        'NL.EORI.LIFEELEC4DMI',
        config('services.ishare.clientId'),
        config('services.ishare.satellites.DMI.private-key')
    );
});

$this->app->bind(ClearingSdk::class, function() {
    return new ClearingSdk(
        $this->app->make(HttpRequestService::class),
        $this->app->make(AuthRepository::class),
        $this->app->make(LoggerInterface::class),
        $this->app->make(CacheInterface::class),
    );
});

Drupal

我们将创建一个 Drupal 模块,发布后将在以下链接中可用:这里