PHP code example of neyric / yousign-bundle
1. Go to this page and download the library: Download neyric/yousign-bundle 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/ */
neyric / yousign-bundle example snippets
$bundles = [
// ...
new \Neyric\YousignBundle\NeyricYousignBundle(),
];
use Neyric\YousignBundle\Event\WebhookEvent;
class MySubscriber implements EventSubscriberInterface
{
public function onYousignWebhook(WebhookEvent $event)
{
$headers = $event->getHeaders();
if (array_key_exists('x-my-custom-header', $headers)) {
// ...
}
// ...
}
public static function getSubscribedEvents()
{
return [
WebhookEvent::class => ['onYousignWebhook'],
];
}
}