PHP code example of paysera / lib-event-notification-client

1. Go to this page and download the library: Download paysera/lib-event-notification-client 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/ */

    

paysera / lib-event-notification-client example snippets


use Paysera\Client\EventNotificationClient\ClientFactory;

$clientFactory = ClientFactory::create([
    'base_url' => 'https://checkout-eu-a.paysera.com/notification/rest/v1/', // optional, in case you need a custom one.
    'basic' => [                                        // use this, it API h-token',
        ],
    ],
    // other configuration options, if needed
]);

$eventNotificationClient = $clientFactory->getEventNotificationClient();


$result = $eventNotificationClient->readNotification($notificationId);


$result = $eventNotificationClient->getNotification($notificationId);

use Paysera\Client\EventNotificationClient\Entity as Entities;

$notificationFilter = new Entities\NotificationFilter();

$notificationFilter->setStatus($status);
    
$result = $eventNotificationClient->getNotifications($notificationFilter);