protected function _sendRequest()
    {
        $logger = $this->_logger;
        $logContext = $this->_logContext;

        $response = null;
        try {
            $response = $this->_api
                ->setRequestBody($this->_request)
                ->send()
                ->getResponseBody();
        } catch (InvalidPayload $e) {
            $logMessage = "Invalid payload for {$this->_getPayloadName()}. See exception log for more details.";
            $logger->warning($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (NetworkError $e) {
            $logMessage = "Caught a network error sending {$this->_getPayloadName()}. See exception log for more details.";
            $logger->warning($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (UnsupportedOperation $e) {
            $logMessage = "{$this->_getPayloadName()} operation is unsupported in the current configuration. See exception log for more details.";
            $logger->critical($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (UnsupportedHttpAction $e) {
            $logMessage = "{$this->_getPayloadName()} request is configured with an unsupported HTTP action. See exception log for more details.";
            $logger->critical($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (Exception $e) {
            $logMessage = "Encountered unexpected exception sending {$this->_getPayloadName()}. See exception log for more details.";
            $logger->warning($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        }
        return $response;
    }
protected function _sendRequest()
    {
        $logger = $this->_logger;
        $logContext = $this->_logContext;

        $response = null;
        try {
            $response = $this->_api
                ->setRequestBody($this->_request)
                ->send()
                ->getResponseBody();
        } catch (InvalidPayload $e) {
            $logMessage = "Invalid payload for {$this->_getPayloadName()}. See exception log for more details.";
            $logger->warning($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (NetworkError $e) {
            $logMessage = "Caught a network error sending {$this->_getPayloadName()}. See exception log for more details.";
            $logger->warning($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (UnsupportedOperation $e) {
            $logMessage = "{$this->_getPayloadName()} operation is unsupported in the current configuration. See exception log for more details.";
            $logger->critical($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (UnsupportedHttpAction $e) {
            $logMessage = "{$this->_getPayloadName()} request is configured with an unsupported HTTP action. See exception log for more details.";
            $logger->critical($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        } catch (Exception $e) {
            $logMessage = "Encountered unexpected exception sending {$this->_getPayloadName()}. See exception log for more details.";
            $logger->warning($logMessage, $logContext->getMetaData(__CLASS__, ['exception_message' => $e->getMessage()]));
            $logger->logException($e, $logContext->getMetaData(__CLASS__, [], $e));
        }
        return $response;
    }
protected function _sendRequest ( ) { $ logger = $ this -> _logger ; $ logContext = $ this -> _logContext ; $ response = null ; try { $ response = $ this -> _api -> setRequestBody ( $ this -> _request ) -> send ( ) -> getResponseBody ( ) ; } catch ( InvalidPayload $ e ) { $ logMessage = "Invalid payload for {$this->_getPayloadName()}. See exception log for more details." ; $ logger -> warning ( $ logMessage , $ logContext -> getMetaData ( __CLASS__ , [ 'exception_message' => $ e -> getMessage ( ) ] ) ) ; $ logger -> logException ( $ e , $ logContext -> getMetaData ( __CLASS__ , [ ] , $ e ) ) ; } catch ( NetworkError $ e ) { $ logMessage = "Caught a network error sending {$this->_getPayloadName()}. See exception log for more details." ; $ logger -> warning ( $ logMessage , $ logContext -> getMetaData ( __CLASS__ , [ 'exception_message' => $ e -> getMessage ( ) ] ) ) ; $ logger -> logException ( $ e , $ logContext -> getMetaData ( __CLASS__ , [ ] , $ e ) ) ; } catch ( UnsupportedOperation $ e ) { $ logMessage = "{$this->_getPayloadName()} operation is unsupported in the current configuration. See exception log for more details." ; $ logger -> critical ( $ logMessage , $ logContext -> getMetaData ( __CLASS__ , [ 'exception_message' => $ e -> getMessage ( ) ] ) ) ; $ logger -> logException ( $ e , $ logContext -> getMetaData ( __CLASS__ , [ ] , $ e ) ) ; } catch ( UnsupportedHttpAction $ e ) { $ logMessage = "{$this->_getPayloadName()} request is configured with an unsupported HTTP action. See exception log for more details." ; $ logger -> critical ( $ logMessage , $ logContext -> getMetaData ( __CLASS__ , [ 'exception_message' => $ e -> getMessage ( ) ] ) ) ; $ logger -> logException ( $ e , $ logContext -> getMetaData ( __CLASS__ , [ ] , $ e ) ) ; } catch ( Exception $ e ) { $ logMessage = "Encountered unexpected exception sending {$this->_getPayloadName()}. See exception log for more details." ; $ logger -> warning ( $ logMessage , $ logContext -> getMetaData ( __CLASS__ , [ 'exception_message' => $ e -> getMessage ( ) ] ) ) ; $ logger -> logException ( $ e , $ logContext -> getMetaData ( __CLASS__ , [ ] , $ e ) ) ; } return $ response ; }
Sending the payload request and returning the response.

@return IPayload | null
Sending the payload request and returning the response .