This is the function that captures some data protected function captureRequestData(RequestInterface $oRequest, $aPostParams) { return [ 'request' => [ 'status' =>'pending', 'params' => json_encode($aPostParams), 'endpoint' => $oRequest->getRequestUri(), 'view' => json_encode($oRequest->getHeaders()->toArray()), 'event' => $this->_oEventobserver->getEventName(), 'data' => json_encode($this->_oEventobserver->getEventData() ), 'ip' => $oRequest->getClientIp(), 'session' => $this->_oCustomerSession->getCustomer()->getName(), 'customer_id' => $this->_oCustomerSession->getCustomerId(), 'created_at' => date('Y-m-d H:i:s'), […]