ufo/webhook-client

该包已被废弃且不再维护。作者建议使用 uwkluis/webhook-client 包。

连接到启用了 webhook API 的客户端包

0.1.10 2018-11-05 10:36 UTC

This package is auto-updated.

Last update: 2020-10-21 08:47:05 UTC


README

Latest Version on Packagist Software License Coverage Status Total Downloads SensioLabsInsight

这是一个处理由 ufo/webhooks 包产生的传入 webhooks 的客户端。

结构

src/
src/Manage/
src/Exception/
src/Receive/

安装

通过 Composer

$ composer require ufo/webhook-client

使用方法

处理传入的 webhook

$function = function (Message $message) {
    $this->logger->log($message->getData());
};

/** @var \Psr\Http\Message\ResponseInterface */
$response = new PsrResponse();

$processor = new \Ufo\WebhookClient\Receive\Processor();
return $processor->process(
    $request,
    $response, 
    $storedIncomingWebhook->getSecret(),
    $function    
);

测试

$ composer test

贡献

请参阅 CONTRIBUTINGCODE_OF_CONDUCT 了解详细信息。

安全性

如果您发现任何与安全性相关的问题,请发送电子邮件至 it@mijnufo.nl 而不是使用问题跟踪器。

鸣谢

许可协议

MIT 许可协议 (MIT)。有关更多信息,请参阅 许可文件