PayPal\Api\WebhookEvent::getEventType PHP Method

getEventType() public method

The event that triggered the webhook event notification.
public getEventType ( ) : string
return string
    public function getEventType()
    {
        return $this->event_type;
    }

Usage Example

 /**
  * Process the given $webhookEvent
  *
  * @param \PayPal\Api\WebhookEvent $webhookEvent
  */
 public function processWebhookRequest(\PayPal\Api\WebhookEvent $webhookEvent)
 {
     if ($webhookEvent->getEventType() !== null && in_array($webhookEvent->getEventType(), $this->getSupportedWebhookEvents())) {
         $this->getOrder($webhookEvent);
         $this->{$this->eventTypeToHandler($webhookEvent->getEventType())}($webhookEvent);
     }
 }
All Usage Examples Of PayPal\Api\WebhookEvent::getEventType