ipnHandlerFactory = $ipnHandlerFactory; $this->compositeProcessor = $compositeProcessor; $this->coreHelper = $coreHelper; } public function execute() { if (UpdateMechanism::IPN !== $this->coreHelper->getUpdateMechanism()) { throw new NotFoundException(__('IPN not enabled.')); } $headers = $this->_request->getHeaders()->toArray(); $body = $this->_request->getContent(); $ipnHandler = $this->ipnHandlerFactory->create($headers, $body); $ipnData = $ipnHandler->toArray(); $this->compositeProcessor->process($ipnData); } }