PHP code example of paysera / notification-php-client
1. Go to this page and download the library: Download paysera/notification-php-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 / notification-php-client example snippets
$container = new Evp_Notification_Container(array(
'cache.filePath' => '/tmp/evp.notifications.public-key.php',
));
try {
$notification = Evp_Notification_Container::create()->getRequestParser()->parseRequest($_POST);
// process $notification somehow
echo 'OK';
} catch (Evp_Notification_Exception $exception) {
// log $exception somehow
// do not respond 'OK' if you want that callback would be repeated after some time
echo 'Error: ' . $exception;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.