PHP code example of linx / oms-notifications-client-php

1. Go to this page and download the library: Download linx/oms-notifications-client-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

linx / oms-notifications-client-php example snippets

 php
use Linx\OmsNotificationClient\Facades\WebhookFacade;

$result = WebhookFacade::create(string 'clientId', string 'token', array 'inputData');
 php
use Linx\OmsNotificationClient\Notification\WebhookService;

$webhookService = new WebhookService();
$result = $webhookService->create(string 'clientId', string 'token', array 'inputData');
 php
$input = [
    'clientId' => 'clientid',
    'referenceId' => 'ORDER-01216215-F1',
    'application' => 'ORDER',
    'url' => 'http://xpto.com',
    'method' => 'POST',
    'body'=> '....',
    'headers' => [],
    'retry' => 2,
    'auth' => [
        'type' => 'Bearer',
        'token' => 'GVSWcOmXb74QMSqBlXS7sSPhiDsatFIaPwf27xPR',
    ]
];
 php
use Linx\OmsNotificationClient\Facades\WhatsappFacade;

$result = WhatsappFacade::create(string 'clientId', string 'token', array 'inputData');
 php
use Linx\OmsNotificationClient\Notification\WhatsappService;

$whatsappService = new WhatsappService();
$result = $whatsappService->create(string 'clientId', string 'token', array 'inputData');