linx/oms-notifications-client-php
最新稳定版本:1.0.4
Composer 安装命令:
composer require linx/oms-notifications-client-php
包简介
Client for oms notification
README 文档
README
Installation
To install OMS-Notification-Client, run the command below and you will get the latest version
composer require linx/oms-notifications-client-php
Configuration
Add variable to enviroment file (.env).
OMS_NOTIFICATION_HOST = http://oms-notification.com.br
Documentaion
OMS Notification client is a library used to access OMS Notification, with a pre-established class of service in order to facilitate integration.
Webhook
Webhook is a type of notification used for integration between applications.
With Laravel
use Linx\OmsNotificationClient\Facades\WebhookFacade; $result = WebhookFacade::create(string 'clientId', string 'token', array 'inputData');
Without Laravel
use Linx\OmsNotificationClient\Notification\WebhookService; $webhookService = new WebhookService(); $result = $webhookService->create(string 'clientId', string 'token', array 'inputData');
Example of inputData
$input = [ 'clientId' => 'clientid', 'referenceId' => 'ORDER-01216215-F1', 'application' => 'ORDER', 'url' => 'http://xpto.com', 'method' => 'POST', 'body'=> '....', 'headers' => [], 'retry' => 2, 'auth' => [ 'type' => 'Bearer', 'token' => 'GVSWcOmXb74QMSqBlXS7sSPhiDsatFIaPwf27xPR', ] ];
=======
Create notification to whatsapp number.
With Laravel
use Linx\OmsNotificationClient\Facades\WhatsappFacade; $result = WhatsappFacade::create(string 'clientId', string 'token', array 'inputData');
Without Laravel
use Linx\OmsNotificationClient\Notification\WhatsappService; $whatsappService = new WhatsappService(); $result = $whatsappService->create(string 'clientId', string 'token', array 'inputData');
Example of inputData
$input = [ 'clientId' => $client->clientId, 'referenceId' => 'ORDER-01216215-F1', 'application' => 89665, 'provider' => [ 'type' => 'TWILIO', 'sid' => 'ACXXXXXX', 'token' => 'GVSWcOmXb74QMSqBlXS7sSPhiDsatFIaPwf27xPR', ], 'to' => 8881231234, 'from' => 9991231234, 'body'=> '....', ];
Maintainers!
Steps to publish release in packagist.org.
- Create realese, atention with Semantic Versioning;
- Access https://packagist.org/packages/linx/oms-notifications-client-php
- Authenticate with your account;
- Click in "Update" button;
If you have no permission to manage the package, contact you manager.
License
This library is released under the MIT license.
统计信息
- 总下载量: 526
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-30