Notification API

All functions related to Notification API

Listeners

List listeners

$client->listListener('sh_0000');

Create a listener

$listener = new \Paygreen\Sdk\Payment\V3\Model\Listener();
$listener->setType('webhook');
$listener->setEvents(array('payment_order.authorized'));
$listener->setUrl('https://my-store.fr');

$client->createListener($listener, 'sh_0000');

Get a listener

$client->getListener('lis_0000');

Update a listener

/**
* The third argument $params is optional
 * (Authorized values : url, events, type)
 */
$client->updateListener('lis_0000', 'https://my-store.fr', array(
    'events' => array(
        'payment_order.authorized',
        'payment_order.refused'
    )
));

Delete a listener

$client->deleteListener('lis_0000');

Notifications

List notifications

$client->listNotification('lis_0000');

Replay a notification

$client->replayNotification('not_0000');