src/Shopping/Services/ShoppingBaseService.php
protected function getEbayHeaders($operationName)
    {
        $headers = [];

        // Add required headers first.
        $headers[self::HDR_API_VERSION] = $this->getConfig('apiVersion');
        $headers[self::HDR_APP_ID] = $this->getConfig('credentials')->getAppId();
        $headers[self::HDR_OPERATION_NAME] = $operationName;
        $headers[self::HDR_REQUEST_FORMAT] = 'XML';

        // Add optional headers.
        // Take into account siteId is an integer that can be set to zero.
        if ($this->getConfig('siteId') !== null) {
            $headers[self::HDR_SITE_ID] = $this->getConfig('siteId');
        }

        if ($this->getConfig('affiliateUserId')) {
            $headers[self::HDR_AFFILIATE_USER_ID] = $this->getConfig('affiliateUserId');
        }

        if ($this->getConfig('trackingId')) {
            $headers[self::HDR_TRACKING_ID] = $this->getConfig('trackingId');
        }

        if ($this->getConfig('trackingPartnerCode')) {
            $headers[self::HDR_TRACKING_PARTNER_CODE] = $this->getConfig('trackingPartnerCode');
        }

        return $headers;
    }
protected function getEbayHeaders($operationName)
    {
        $headers = [];

        // Add required headers first.
        $headers[self::HDR_API_VERSION] = $this->getConfig('apiVersion');
        $headers[self::HDR_APP_ID] = $this->getConfig('credentials')->getAppId();
        $headers[self::HDR_OPERATION_NAME] = $operationName;
        $headers[self::HDR_REQUEST_FORMAT] = 'XML';

        // Add optional headers.
        // Take into account siteId is an integer that can be set to zero.
        if ($this->getConfig('siteId') !== null) {
            $headers[self::HDR_SITE_ID] = $this->getConfig('siteId');
        }

        if ($this->getConfig('affiliateUserId')) {
            $headers[self::HDR_AFFILIATE_USER_ID] = $this->getConfig('affiliateUserId');
        }

        if ($this->getConfig('trackingId')) {
            $headers[self::HDR_TRACKING_ID] = $this->getConfig('trackingId');
        }

        if ($this->getConfig('trackingPartnerCode')) {
            $headers[self::HDR_TRACKING_PARTNER_CODE] = $this->getConfig('trackingPartnerCode');
        }

        return $headers;
    }
Builds the needed eBay HTTP headers.

@param string $operationName The name of the operation been called.

@return array An associative array of eBay http headers.