public function deliveryFailure(WebhookEventDelivery $delivery)
 {
     $delivery->setDelivered(false);
     $delivery->setDeliverTries($delivery->getDeliveryTries() + 1);
     $this->update($delivery);
 }
 protected function insertWebhookEventDelivery(EntityManager $em, \Pimple $DI)
 {
     $delivery = new WebhookEventDelivery();
     $delivery->setThirdPartyApplication($DI['api-app-user']);
     $delivery->setWebhookEvent($DI['event_webhook_1']);
     $delivery->setDelivered(true);
     $em->persist($delivery);
     $delivery2 = new WebhookEventDelivery();
     $delivery2->setThirdPartyApplication($DI['api-app-user-not-admin']);
     $delivery2->setWebhookEvent($DI['event_webhook_1']);
     $delivery2->setDeliverTries(1);
     $em->persist($delivery2);
 }
Esempio n. 3
0
 private function getUrl(ApiApplication $application, WebhookEventDelivery $delivery)
 {
     return sprintf('%s#%s', $application->getWebhookUrl(), $delivery->getId());
 }