Oara\Network\Publisher\CommissionJunction::getMerchantExport PHP Method

getMerchantExport() private method

private getMerchantExport ( ) : array
return array
    private function getMerchantExport()
    {
        $merchantReportList = array();
        $valuesFromExport = array(new \Oara\Curl\Parameter('sortKey', 'active_start_date'), new \Oara\Curl\Parameter('sortOrder', 'DESC'), new \Oara\Curl\Parameter('contractView', 'ALL'), new \Oara\Curl\Parameter('contractView', 'ALL'), new \Oara\Curl\Parameter('format', '6'), new \Oara\Curl\Parameter('contractState', 'active'), new \Oara\Curl\Parameter('column', 'merchantid'), new \Oara\Curl\Parameter('column', 'websitename'), new \Oara\Curl\Parameter('column', 'merchantcategory'));
        $urls = array();
        $urls[] = new \Oara\Curl\Request('https://members.cj.com/member/' . $this->_memberId . '/publisher/accounts/listmyadvertisers.do', array());
        $exportReport = $this->_client->get($urls);
        if (!preg_match('/Sorry, No Results Found\\./', $exportReport[0], $matches)) {
            $urls = array();
            $urls[] = new \Oara\Curl\Request('https://members.cj.com/member/' . $this->_memberId . '/publisher/accounts/listmyadvertisers.do', $valuesFromExport);
            $exportReport = $this->_client->post($urls);
            $exportData = str_getcsv($exportReport[0], "\n");
            $merchantReportList = array();
            $num = count($exportData);
            for ($i = 1; $i < $num; $i++) {
                $merchantExportArray = str_getcsv($exportData[$i], ",");
                $merchantReportList[] = $merchantExportArray;
            }
        }
        return $merchantReportList;
    }