当前位置: 首页>>代码示例>>PHP>>正文


PHP unknown_type::post方法代码示例

本文整理汇总了PHP中unknown_type::post方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::post方法的具体用法?PHP unknown_type::post怎么用?PHP unknown_type::post使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unknown_type的用法示例。


在下文中一共展示了unknown_type::post方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getTransactionList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
 {
     $totalTransactions = array();
     $urls = array();
     $exportParams = array(new Oara_Curl_Parameter('agentcode', $this->_credentials['user']), new Oara_Curl_Parameter('pword', $this->_credentials['password']), new Oara_Curl_Parameter('fromdate', $dStartDate->toString("dd-MM-yyyy")), new Oara_Curl_Parameter('todate', $dEndDate->toString("dd-MM-yyyy")), new Oara_Curl_Parameter('rqtype', "report"));
     $urls[] = new Oara_Curl_Request('https://www.parkandgo.co.uk/agents/', $exportParams);
     $exportReport = $this->_client->post($urls);
     $today = new Zend_Date();
     $today->setHour(0);
     $today->setMinute(0);
     $exportData = str_getcsv($exportReport[0], "\n");
     $num = count($exportData);
     for ($i = 1; $i < $num; $i++) {
         $transactionExportArray = str_getcsv($exportData[$i], ",");
         $arrivalDate = new Zend_Date($transactionExportArray[3], 'yyyy-MM-dd 00:00:00', 'en');
         $transaction = array();
         $transaction['merchantId'] = 1;
         $transaction['unique_id'] = $transactionExportArray[0];
         $transactionDate = new Zend_Date($transactionExportArray[2], 'yyyy-MM-dd 00:00:00', 'en');
         $transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
         unset($transactionDate);
         $transaction['status'] = Oara_Utilities::STATUS_PENDING;
         if ($today > $arrivalDate) {
             $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
         }
         $transaction['amount'] = Oara_Utilities::parseDouble($transactionExportArray[6]);
         $transaction['commission'] = Oara_Utilities::parseDouble($transactionExportArray[7]);
         $totalTransactions[] = $transaction;
     }
     return $totalTransactions;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:35,代码来源:ParkAndGo.php

示例2: checkConnection

 /**
  * Check the connection
  */
 public function checkConnection()
 {
     //If not login properly the construct launch an exception
     $connection = true;
     $urls = array();
     $urls[] = new Oara_Curl_Request('https://affiliate.hidemyass.com/dashboard', array());
     $exportReport = $this->_client->post($urls);
     $dom = new Zend_Dom_Query($exportReport[0]);
     $results = $dom->query('#loginform');
     if (count($results) > 0) {
         $connection = false;
     }
     return $connection;
 }
开发者ID:garygarside,项目名称:php-oara,代码行数:17,代码来源:HideMyAss.php

示例3: checkConnection

 /**
  * Check the connection
  */
 public function checkConnection()
 {
     //If not login properly the construct launch an exception
     $connection = false;
     $urls = array();
     $urls[] = new Oara_Curl_Request('http://affiliates.paddypartners.com/affiliates/Dashboard.aspx', array());
     $exportReport = $this->_client->post($urls);
     $dom = new Zend_Dom_Query($exportReport[0]);
     $results = $dom->query('.lnkLogOut');
     if (count($results) > 0) {
         $connection = true;
     }
     return $connection;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:17,代码来源:PaddyPower.php

示例4: getPaymentHistory

 /**
  * (non-PHPdoc)
  * @see Oara/Network/Oara_Network_Base#getPaymentHistory()
  */
 public function getPaymentHistory()
 {
     $paymentHistory = array();
     $valuesFromExport = Oara_Utilities::cloneArray($this->_exportPaymentParameters);
     $valuesFromExport[] = new Oara_Curl_Parameter('fromDate', "01/01/2000");
     $dEndDate = new Zend_Date();
     $valuesFromExport[] = new Oara_Curl_Parameter('until', $dEndDate->toString("dd/MM/yyyy"));
     $urls = array();
     $urls[] = new Oara_Curl_Request('https://www.ladbrokes.com/aff_man', $valuesFromExport);
     $exportReport = $this->_client->post($urls);
     $dom = new Zend_Dom_Query($exportReport[0]);
     $tableList = $dom->query('#results_table');
     $exportData = self::htmlToCsv(self::DOMinnerHTML($tableList->current()));
     $num = count($exportData);
     for ($i = 2; $i < $num - 2; $i++) {
         $paymentExportArray = str_getcsv($exportData[$i], ";");
         $obj = array();
         $date = new Zend_Date($paymentExportArray[1], "dd/MM/yy", 'en');
         $obj['date'] = $date->toString("yyyy-MM-dd HH:mm:ss");
         $obj['pid'] = $i - 1;
         $obj['value'] = $paymentExportArray[10];
         $obj['method'] = 'BACS';
         $paymentHistory[] = $obj;
     }
     return $paymentHistory;
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:30,代码来源:Ladbrokers.php

示例5: getTransactionList

 /**
  * @param null $merchantList
  * @param \DateTime|null $dStartDate
  * @param \DateTime|null $dEndDate
  * @return array
  */
 public function getTransactionList($merchantList = null, \DateTime $dStartDate = null, \DateTime $dEndDate = null)
 {
     $totalTransactions = array();
     $valuesFromExport = array();
     $valuesFromExport[] = new \Oara\Curl\Parameter('ctl00$cphPage$reportFrom', $dStartDate->format("Y-m-d"));
     $valuesFromExport[] = new \Oara\Curl\Parameter('ctl00$cphPage$reportTo', $dEndDate->format("Y-m-d"));
     $urls = array();
     $urls[] = new \Oara\Curl\Request('https://affiliates.affutd.com/affiliatesv1/DataServiceWrapper/DataService.svc/Export/CSV/Affiliates_Reports_GeneralStats_DailyFigures', $valuesFromExport);
     $exportReport = $this->_client->post($urls);
     $exportData = \str_getcsv($exportReport[0], "\n");
     $num = \count($exportData);
     for ($i = 2; $i < $num - 1; $i++) {
         $transactionExportArray = \str_getcsv($exportData[$i], ",");
         $transaction = array();
         $transaction['merchantId'] = 1;
         $date = \DateTime::createFromFormat("d-m-Y", trim($transactionExportArray[0]));
         $date->setTime(0, 0);
         $transaction['date'] = $date->format("Y-m-d H:i:s");
         $transaction['status'] = \Oara\Utilities::STATUS_CONFIRMED;
         $transaction['amount'] = \Oara\Utilities::parseDouble($transactionExportArray[16]);
         $transaction['commission'] = \Oara\Utilities::parseDouble($transactionExportArray[16]);
         $totalTransactions[] = $transaction;
     }
     return $totalTransactions;
 }
开发者ID:fubralimited,项目名称:php-oara,代码行数:31,代码来源:AffiliatesUnited.php

示例6: getCreatives

 /**
  * (non-PHPdoc)
  * @see Oara/Network/Oara_Network_Base#getCreatives()
  */
 public function getCreatives()
 {
     $creativesMap = array();
     $merchantList = self::getMerchantList();
     foreach ($merchantList as $merchant) {
         $urls = array();
         $valuesFormExport = array();
         $valuesFormExport[] = new Oara_Curl_Parameter('__EVENTTARGET', '');
         $valuesFormExport[] = new Oara_Curl_Parameter('__EVENTARGUMENT', '');
         $valuesFormExport[] = new Oara_Curl_Parameter('__LASTFOCUS', '');
         $valuesFormExport[] = new Oara_Curl_Parameter('__VIEWSTATE', '/wEPDwUKMTQzMTQ3MzI4MQ9kFgJmD2QWBGYPZBYEAgMPFgIeBGhyZWYFFC9UZW1wbGF0ZXMvMV9zZWMuY3NzZAIFDxYCHwAFJC90ZW1wbGF0ZXMvQ3VzdG9tTWVyY2hhbnRDU1MvNTQyLmNzc2QCAQ9kFgQCAw9kFggCAw8PFgIeB1Zpc2libGVoZGQCBA9kFggCAg8QD2QWAh4Ib25jaGFuZ2UFFVNldFNpemVDb250cm9sVmFsdWUoKRAVFANBbGwcTWVkaXVtIFJlY3RhbmdsZSAoMzAwIHggMjUwKR5WZXJ0aWNhbCBSZWN0YW5nbGUgKDI0MCB4IDQwMCkbTGFyZ2UgUmVjdGFuZ2xlICgzMzYgeCAyODApFVJlY3RhbmdsZSAoMzAwIHggMTAwKRVQb3AtVW5kZXIgKDcyMCB4IDMwMCkcTWVkaXVtIFJlY3RhbmdsZSAoMzAwIHggMjUwKRZGdWxsIEJhbm5lciAoNDY4IHggNjApFkhhbGYgQmFubmVyICgyMzQgeCA2MCkTTWljcm8gQmFyICg4OCB4IDMxKRNCdXR0b24gMSAoMTIwIHggOTApE0J1dHRvbiAyICgxMjAgeCA2MCkbVmVydGljYWwgQmFubmVyICgxMjAgeCAyNDApGVNxdWFyZSBCdXR0b24gKDEyNSB4IDEyNSkWTGVhZGVyYm9hcmQgKDcyOCB4IDkwKRtXaWRlIFNreXNjcmFwZXIgKDE2MCB4IDYwMCkWU2t5c2NyYXBlciAoMTIwIHggNjAwKRhIYWxmIFBhZ2UgQWQgKDMwMCB4IDYwMCkVQmlsbGJvYXJkICg3NTAgeCAxMDApG0RvdWJsZWJpbGxib2FyZCAoNzUwIHggMjAwKRUUAAkzMDAgeCAyNTAJMjQwIHggNDAwCTMzNiB4IDI4MAkzMDAgeCAxMDAJNzIwIHggMzAwCTMwMCB4IDI1MAg0NjggeCA2MAgyMzQgeCA2MAc4OCB4IDMxCDEyMCB4IDkwCDEyMCB4IDYwCTEyMCB4IDI0MAkxMjUgeCAxMjUINzI4IHggOTAJMTYwIHggNjAwCTEyMCB4IDYwMAkzMDAgeCA2MDAJNzUwIHggMTAwCTc1MCB4IDIwMBQrAxRnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2RkAgYPEGQQFQcDQWxsBUltYWdlDEhUTUwgQ29udGVudA1GbGFzaCBCYW5uZXJzCkVkaXRvcmlhbHMFTWl4ZWQJVGV4dCBMaW5rFQcAATEBMgEzATUBNgE3FCsDB2dnZ2dnZ2dkZAIHD2QWAgIFDxBkEBUWA0FsbAdBZG1pcmFsD0FyZ29zIEluc3VyYW5jZQxBU0RBIEZpbmFuY2UcQmVubmV0dHMgTW90b3JiaWtlIEluc3VyYW5jZQlDaHVyY2hpbGwLRGlyZWN0IExpbmUYRGlyZWN0IFRyYXZlbCBJbnN1cmFuY2UgCEV1cm9zdGFyCUdvY29tcGFyZQpHcmVlbiBGbGFnFEhhbGlmYXggQ3JlZGl0IENhcmRzEkt3aWsgRml0IEluc3VyYW5jZRFNYXJrcyBhbmQgU3BlbmNlciBPaW5jLmNvbSBPbmxpbmUgVHJhdmVsIEluc3VyYW5jZRJPbmxpbmUgTWVkaWEgR3JvdXANUmVzY3VlIE15IENhchBTYWluc2J1cnkncyBCYW5rFFRyYXZlbCBJbnN1cmFuY2UgV2ViDFZpcmdpbiBNb25leQdXSFNtaXRoDVllcyBJbnN1cmFuY2UVFgEwBDQzMDEGMTExMzQ5BTg2MjUzBDI0MjEEMTIzNgQxNTM2BTEyMjUxBDQ4ODMEMzQ2NgQxNTM3BTE2MTgzBDE3NTQEMjI1MQU2NTU1NQQxMDI1BDQzODgFNDEzMzEEMTk1NgMzNTEENDU2OAQyMjc2FCsDFmdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dkZAIID2QWBAIMDw8WAh4JTWF4TGVuZ3RoZmRkAhIPDxYCHwNmZGQCBQ9kFgQCBQ8QZGQWAGQCDQ8QZGQWAWZkAgYPD2QPEBYDZgIBAgIWAxYCHg5QYXJhbWV0ZXJWYWx1ZQUDNTQyFgIfBGQWAh8EZBYDAgUCAwIDZGQCBQ8PFgIfAWhkZGTBpeqPSNcBsSw8OmyhYN8N7YyNcg==');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$Uc_Navigation1$ddlNavSelectMerchant', '0');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$drpSize', '');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$txtSize', '');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$drpType', '');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$drpMerchant', $merchant['cid']);
         //
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$drpProduct', '-1');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$cmdSearch', 'Search');
         $valuesFormExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$Uc_containersearch1$proghiddenfield', '');
         $urls[] = new Oara_Curl_Request('https://admin.omgpm.com/v2/creative/affiliate/adcentre.aspx?', $valuesFormExport);
         $exportReport = $this->_client->post($urls);
         var_dump($exportReport[0]);
         //OMGCreativeURL34321=<script type="text/javascript" src="http://track.omguk.com/bs/?AID=542&MID=86253&PID=6748&CID=3060734&CRID=34321&WID=18372&Width=490&Height=250"></script>
         //hidden34321=html
         //hiddencid34321=3060734
         //hiddenMid34321=86253
         //hiddenPid34321=6748
     }
     return $creativesMap;
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:35,代码来源:Omg.php

示例7: getTransactionList

 /**
  * (non-PHPdoc)
  * 
  * @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
 {
     $totalTransactions = array();
     $valuesFormExport = array();
     if ($this->_transactionList == null) {
         $urls = array();
         $valuesExport = array(new Oara_Curl_Parameter('D', '{"C":"Pap_Affiliates_Reports_TransactionsGrid", "M":"getCSVFile", "S":"' . $this->_s . '", "FormResponse":"Y", "sort_col":"dateinserted", "sort_asc":false, "offset":0, "limit":30, "columns":[["id"],["id"],["commission"],["totalcost"],["fixedcost"],["t_orderid"],["productid"],["dateinserted"],["name"],["rtype"],["tier"],["commissionTypeName"],["rstatus"],["merchantnote"],["channel"]]}'));
         $urls[] = new Oara_Curl_Request('https://vpnaffiliates.com/affiliates/scripts/server.php?', $valuesExport);
         $exportReport = array();
         $exportReport = $this->_client->post($urls);
         $this->_transactionList = str_getcsv($exportReport[0], "\n");
     }
     $exportData = $this->_transactionList;
     $num = count($exportData);
     for ($i = 1; $i < $num; $i++) {
         $transactionExportArray = str_getcsv($exportData[$i], ",");
         // print_r($transactionExportArray);
         $transaction = array();
         $transaction['merchantId'] = 1;
         $transaction['uniqueId'] = $transactionExportArray[3];
         $transactionDate = new Zend_Date($transactionExportArray[5], 'yyyy-MM-dd HH:mm:ss', 'en');
         $transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
         unset($transactionDate);
         $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
         $transaction['amount'] = Oara_Utilities::parseDouble($transactionExportArray[1]);
         $transaction['commission'] = Oara_Utilities::parseDouble($transactionExportArray[0]);
         // print_r($transaction);
         if ($transaction['date'] >= $dStartDate->toString("yyyy-MM-dd HH:mm:ss") && $transaction['date'] <= $dEndDate->toString("yyyy-MM-dd HH:mm:ss")) {
             $totalTransactions[] = $transaction;
         }
     }
     return $totalTransactions;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:38,代码来源:VpnAffiliates.php

示例8: getPaymentHistory

 /**
  * (non-PHPdoc)
  * 
  * @see Oara/Network/Oara_Network_Publisher_Base#getPaymentHistory()
  */
 public function getPaymentHistory()
 {
     $paymentHistory = array();
     $valuesFromExport = $this->_exportPaymentParameters;
     $urls = array();
     $urls[] = new Oara_Curl_Request('https://admin.omgpm.com/v2/finance/affiliate/view_payments.aspx?', array());
     $exportReport = $this->_client->get($urls);
     /**
      * * load the html into the object **
      */
     $doc = new DOMDocument();
     libxml_use_internal_errors(true);
     $doc->validateOnParse = true;
     $doc->loadHTML($exportReport[0]);
     $hiddenList = $doc->getElementsByTagName('input');
     if ($hiddenList->length > 0) {
         for ($i = 0; $i < $hiddenList->length; $i++) {
             $attrs = $hiddenList->item($i)->attributes;
             if ($attrs->getNamedItem("type")->nodeValue == 'hidden') {
                 // we are adding the hidden parameters
                 $valuesFromExport[] = new Oara_Curl_Parameter($attrs->getNamedItem("name")->nodeValue, $attrs->getNamedItem("value")->nodeValue);
             }
         }
         $yearSelect = $doc->getElementById('ctl00_ContentPlaceHolder1_ddlYear')->childNodes;
         $yearStart = (int) $yearSelect->item($yearSelect->length - 1)->attributes->getNamedItem("value")->nodeValue;
         $nowDays = new Zend_Date();
         $yearEnd = (int) $nowDays->get(Zend_Date::YEAR);
         $urls = array();
         for ($i = $yearStart; $i <= $yearEnd; $i++) {
             $requestValuesFromExport = Oara_Utilities::cloneArray($valuesFromExport);
             $requestValuesFromExport[] = new Oara_Curl_Parameter('ctl00$ContentPlaceHolder1$ddlYear', (string) $i);
             $urls[] = new Oara_Curl_Request('https://admin.omgpm.com/v2/finance/affiliate/view_payments.aspx?', $requestValuesFromExport);
         }
         $exportReport = $this->_client->post($urls);
         for ($i = 0; $i < count($exportReport); $i++) {
             if (!preg_match("/No Results for this criteria/i", $exportReport[$i])) {
                 $doc = new DOMDocument();
                 libxml_use_internal_errors(true);
                 $doc->validateOnParse = true;
                 $doc->loadHTML($exportReport[$i]);
                 $table = $doc->getElementById('ctl00_ContentPlaceHolder1_gvSummary');
                 $paymentList = $table->childNodes;
                 for ($j = 1; $j < $paymentList->length; $j++) {
                     $paymentData = $paymentList->item($j)->childNodes;
                     $obj = array();
                     $obj['value'] = Oara_Utilities::parseDouble($paymentData->item(5)->nodeValue);
                     if ($obj['value'] != null) {
                         $date = new Zend_date($paymentData->item(8)->nodeValue, "dd/MM/yyyy HH:mm:ss");
                         $obj['date'] = $date->toString("yyyy-MM-dd HH:mm:ss");
                         $obj['pid'] = $paymentData->item(2)->nodeValue;
                         $obj['method'] = 'BACS';
                         $paymentHistory[] = $obj;
                     }
                 }
             }
         }
     }
     return $paymentHistory;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:64,代码来源:Omg.php

示例9: logIn

 private function logIn()
 {
     $user = $this->_credentials['user'];
     $password = $this->_credentials['password'];
     $network = $this->_credentials['network'];
     $this->_networkServer = "";
     switch ($network) {
         case "uk":
             $this->_networkServer = "https://affiliate-program.amazon.co.uk";
             break;
         case "es":
             $this->_networkServer = "https://afiliados.amazon.es";
             break;
         case "us":
             $this->_networkServer = "https://affiliate-program.amazon.com";
             break;
         case "ca":
             $this->_networkServer = "https://associates.amazon.ca";
             break;
         case "de":
             $this->_networkServer = "https://partnernet.amazon.de";
             break;
         case "fr":
             $this->_networkServer = "https://partenaires.amazon.fr";
             break;
         case "it":
             $this->_networkServer = "https://programma-affiliazione.amazon.it/";
             break;
         case "jp":
             $this->_networkServer = "https://affiliate.amazon.co.jp/";
             break;
         case "cn":
             $this->_networkServer = "https://associates.amazon.cn/";
             break;
     }
     //Get html after Js
     $hiddenParams = self::getHiddenParamsAfterJs($this->_credentials);
     $valuesLogin = array(new Oara_Curl_Parameter('email', $user), new Oara_Curl_Parameter('password', $password), new Oara_Curl_Parameter('x', '33'), new Oara_Curl_Parameter('y', '10'));
     foreach ($hiddenParams as $hiddenParamName => $hiddenParamValue) {
         $valuesLogin[] = new Oara_Curl_Parameter($hiddenParamName, $hiddenParamValue);
     }
     $urls = array();
     $urls[] = new Oara_Curl_Request($this->_networkServer . "/gp/flex/sign-in/select.html?", $valuesLogin);
     $contentList = $this->_client->post($urls);
     $valuesLogin = array(new Oara_Curl_Parameter('combinedReports', 'on'), new Oara_Curl_Parameter('refURL', '/gp/associates/network/reports/report.html?reportType=earningsReport'));
     $urls = array();
     $urls[] = new Oara_Curl_Request($this->_networkServer . "/gp/associates/x-site/combinedReports.html?", $valuesLogin);
     $this->_client->get($urls);
     if (!self::checkConnection()) {
         throw new Exception("You are not connected\n\n");
     }
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:52,代码来源:Amazon.php

示例10: getPaymentHistory

 /**
  * (non-PHPdoc)
  * @see Oara/Network/Oara_Network_Base#getPaymentHistory()
  */
 public function getPaymentHistory()
 {
     $paymentHistory = array();
     $urls = array();
     $valuesFromExport = array();
     $valuesFromExport[] = new Oara_Curl_Parameter('fo', 'true');
     $valuesFromExport[] = new Oara_Curl_Parameter('filter_payments_posted', 'true');
     $urls[] = new Oara_Curl_Request('http://publisher.daisycon.com/en/financial/payments/?', $valuesFromExport);
     $exportReport = $this->_client->get($urls);
     $dom = new Zend_Dom_Query($exportReport[0]);
     $results = $dom->query('#filter_payments_selection_start_year_id');
     $count = count($results);
     $yearArray = array();
     if ($count == 1) {
         $selectNode = $results->current();
         $yearLines = $selectNode->childNodes;
         for ($i = 0; $i < $yearLines->length; $i++) {
             $yearArray[] = $yearLines->item($i)->attributes->getNamedItem("value")->nodeValue;
         }
         foreach ($yearArray as $year) {
             $valuesFromExport = array();
             $valuesFromExport[] = new Oara_Curl_Parameter('fo', 'true');
             $valuesFromExport[] = new Oara_Curl_Parameter('filter_payments_posted', 'true');
             $valuesFromExport[] = new Oara_Curl_Parameter('filter_payments[selection][start_year]', $year);
             $urls = array();
             $urls[] = new Oara_Curl_Request('http://publisher.daisycon.com/en/financial/payments/?', $valuesFromExport);
             $exportReport = $this->_client->post($urls);
             $dom = new Zend_Dom_Query($exportReport[0]);
             $payments = $dom->query('.financialPaymentsTable');
             foreach ($payments as $payment) {
                 $paymentReport = self::htmlToCsv(self::DOMinnerHTML($payment));
                 $paymentExportArray = str_getcsv($paymentReport[2], ";");
                 if ($paymentExportArray[0] != "") {
                     $obj = array();
                     $paymentDate = new Zend_Date($paymentExportArray[0], "MM dd yyyy", "en");
                     $obj['date'] = $paymentDate->toString("yyyy-MM-dd HH:mm:ss");
                     $obj['pid'] = $paymentDate->toString("yyyyMMdd");
                     $obj['method'] = 'BACS';
                     if (preg_match("/[-+]?[0-9]*,?[0-9]*\\.?[0-9]+/", $paymentExportArray[4], $matches)) {
                         $obj['value'] = Oara_Utilities::parseDouble($matches[0]);
                     } else {
                         throw new Exception("Problem reading payments");
                     }
                     $paymentHistory[] = $obj;
                 }
             }
         }
     } else {
         throw new Exception('Problem getting the payments');
     }
     return $paymentHistory;
 }
开发者ID:robryanx,项目名称:php-oara,代码行数:56,代码来源:Daisycon.php

示例11: getTransactionList

 /**
  * (non-PHPdoc)
  * 
  * @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
 {
     $totalTransactions = array();
     $page = 1;
     $continue = true;
     while ($continue) {
         $valuesFormExport = array();
         $valuesFormExport[] = new Oara_Curl_Parameter('dateFrom', $dStartDate->toString("dd/MM/yyyy"));
         $valuesFormExport[] = new Oara_Curl_Parameter('dateTo', $dEndDate->toString("dd/MM/yyyy"));
         $valuesFormExport[] = new Oara_Curl_Parameter('startIndex', $page);
         $valuesFormExport[] = new Oara_Curl_Parameter('numberOfPages', '1');
         $urls = array();
         $urls[] = new Oara_Curl_Request('https://etrader.kalahari.com/view/affiliate/transactionreport', $valuesFormExport);
         $exportReport = $this->_client->post($urls);
         $dom = new Zend_Dom_Query($exportReport[0]);
         $results = $dom->query('table');
         $exportData = self::htmlToCsv(self::DOMinnerHTML($results->current()));
         if (preg_match("/No results found/", $exportData[1])) {
             $continue = false;
             break;
         } else {
             $page++;
         }
         for ($j = 1; $j < count($exportData); $j++) {
             $transactionDetail = str_getcsv($exportData[$j], ";");
             $transaction = array();
             $transaction['merchantId'] = "1";
             if (preg_match("/Order dispatched: ([0-9]+) /", $transactionDetail[2], $match)) {
                 $transaction['custom_id'] = $match[1];
             }
             $date = new Zend_Date($transactionDetail[0], "dd MMM yyyy", "en_GB");
             $transaction['date'] = $date->toString("yyyy-MM-dd 00:00:00");
             $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
             if ($transactionDetail[3] != null) {
                 preg_match("/[-+]?[0-9]*\\.?[0-9]+/", $transactionDetail[3], $match);
                 $transaction['amount'] = (double) $match[0];
                 $transaction['commission'] = (double) $match[0];
             } else {
                 if ($transactionDetail[4] != null) {
                     preg_match("/[-+]?[0-9]*\\.?[0-9]+/", $transactionDetail[4], $match);
                     $transaction['amount'] = (double) $match[0];
                     $transaction['commission'] = (double) $match[0];
                 }
             }
             $totalTransactions[] = $transaction;
         }
     }
     return $totalTransactions;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:54,代码来源:Etrader.php

示例12: getTransactionList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
 {
     $totalTransactions = array();
     $valuesFromExport = array();
     $valuesFromExport[] = new Oara_Curl_Parameter('ctl00$cphPage$reportFrom', $dStartDate->toString("yyyy-MM-dd"));
     $valuesFromExport[] = new Oara_Curl_Parameter('ctl00$cphPage$reportTo', $dEndDate->toString("yyyy-MM-dd"));
     $urls = array();
     $urls[] = new Oara_Curl_Request('https://affiliates.affutd.com/affiliates/DataServiceWrapper/DataService.svc/Export/CSV/Affiliates_Reports_GeneralStats_DailyFigures', $valuesFromExport);
     $exportReport = $this->_client->post($urls);
     $exportData = str_getcsv($exportReport[0], "\n");
     $num = count($exportData);
     for ($i = 2; $i < $num; $i++) {
         $transactionExportArray = str_getcsv($exportData[$i], ",");
         $transaction = array();
         $transaction['merchantId'] = 1;
         $transactionDate = new Zend_Date($transactionExportArray[0], 'dd-MM-yyyy', 'en');
         $transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
         $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
         $transaction['amount'] = $transactionExportArray[12];
         $transaction['commission'] = $transactionExportArray[13];
         $totalTransactions[] = $transaction;
     }
     return $totalTransactions;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:28,代码来源:AffiliatesUnited.php

示例13: getTransactionList

 /**
  * (non-PHPdoc)
  * @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
  */
 public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
 {
     $totalTransactions = array();
     $valuesFormExport = array();
     $valuesFromExport[] = new Oara_Curl_Parameter('periods', 'custom');
     $valuesFromExport[] = new Oara_Curl_Parameter('minDate', '{"year":"2009","month":"05","day":"01"}');
     $valuesFromExport[] = new Oara_Curl_Parameter('show_periods', '1');
     $valuesFromExport[] = new Oara_Curl_Parameter('fromPeriod', $dStartDate->toString('yyyy-MM-dd'));
     $valuesFromExport[] = new Oara_Curl_Parameter('toPeriod', $dEndDate->toString('yyyy-MM-dd'));
     $valuesFromExport[] = new Oara_Curl_Parameter('product', '');
     $valuesFromExport[] = new Oara_Curl_Parameter('profile', '');
     $valuesFromExport[] = new Oara_Curl_Parameter('campaign', '16800');
     $valuesFromExport[] = new Oara_Curl_Parameter('jsonCampaigns', '{"16800":{"group":{"banner":"Banner","product":"Brand","campaign":"Campaign","platform":"Platform","productType":"Product type","profile":"Profile","date":"Stats date","month":"Stats month","var1":"var1","var2":"var2","var3":"var3","var4":"var4"},"order":{"pokerTournamentFees":"Poker tournament fees","pokerRakes":"Poker rakes","chargebacks":"Chargebacks amt","comps":"Comps amt","credits":"Credit amt","depositsAmount":"Deposits amt","depositsCount":"Deposits cnt","realClicks":"Real clicks","realDownloads":"Real downs","realImpressions":"Real imps","withdrawsAmount":"Withdraws","casinoNetGaming":"Casino Net Gaming","pokerNetGaming":"Poker Net Gaming","pokerSideGamesNG":"Poker Side Games Net Gaming","bingoNetGaming":"Bingo Net Gaming","bingoSideGamesNG":"Bingo Side Games Net Gaming","bingoTotalFDCount":"Bingo Total First Deposit Count","casinoTotalFDCount":"Casino Total First Deposit Count","pokerTotalFDCount":"Poker Total First Deposit Count","casinoTotalRealPlayers":"Casino Total Real Players","bingoTotalRealPlayers":"Bingo Total Real Players","pokerTotalRealPlayers":"Poker Total Real Players","tlrAmount":"Top Level Revenue"}}}');
     $valuesFromExport[] = new Oara_Curl_Parameter('ts_type', 'advertiser');
     $valuesFromExport[] = new Oara_Curl_Parameter('reportFirst', 'date');
     $valuesFromExport[] = new Oara_Curl_Parameter('reportSecond', '');
     $valuesFromExport[] = new Oara_Curl_Parameter('reportThird', '');
     $valuesFromExport[] = new Oara_Curl_Parameter('columns[]', 'casinoNetGaming');
     $valuesFromExport[] = new Oara_Curl_Parameter('columns[]', 'tlrAmount');
     $valuesFromExport[] = new Oara_Curl_Parameter('csvRequested', 'EXPORT CSV');
     $urls = array();
     $urls[] = new Oara_Curl_Request('https://www.winneraffiliates.com/traffic-stats/advertiser', $valuesFromExport);
     $exportReport = array();
     $exportReport = $this->_client->post($urls);
     $exportData = str_getcsv($exportReport[0], "\n");
     $num = count($exportData);
     for ($i = 1; $i < $num; $i++) {
         $transactionExportArray = str_getcsv($exportData[$i], ",");
         $transaction = array();
         $transaction['merchantId'] = 1;
         $transactionDate = new Zend_Date($transactionExportArray[0], 'yyyy-MM-dd HH:mm:ss', 'en');
         $transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
         //unset($transactionDate);
         $transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
         $amount = str_replace('$', '', $transactionExportArray[1]);
         $transaction['amount'] = (double) $amount;
         $commission = str_replace('$', '', $transactionExportArray[2]);
         $transaction['commission'] = (double) $commission;
         if ($transaction['amount'] != 0 && $transaction['commission'] != 0) {
             $totalTransactions[] = $transaction;
         }
     }
     return $totalTransactions;
 }
开发者ID:garygarside,项目名称:php-oara,代码行数:48,代码来源:WinnerAffiliates.php

示例14: getPaymentHistory

 /**
  * (non-PHPdoc)
  * @see Oara/Network/Oara_Network_Publisher_Base#getPaymentHistory()
  */
 public function getPaymentHistory()
 {
     $paymentHistory = array();
     foreach (array_keys($this->_websiteList) as $websiteId) {
         $paymentExport = Oara_Utilities::cloneArray($this->_exportPaymentParameters);
         $urls = array();
         $urls[] = new Oara_Curl_Request('http://www.clixgalore.co.uk/AffiliatePaymentDetail.aspx?', array());
         $exportReport = $this->_client->post($urls);
         $dom = new Zend_Dom_Query($exportReport[0]);
         $results = $dom->query('input[type="hidden"]');
         $count = count($results);
         foreach ($results as $result) {
             $hiddenName = $result->attributes->getNamedItem("name")->nodeValue;
             $hiddenValue = $result->attributes->getNamedItem("value")->nodeValue;
             $paymentExport[] = new Oara_Curl_Parameter($hiddenName, $hiddenValue);
         }
         $paymentExport[] = new Oara_Curl_Parameter('AffProgramDropDown1$aff_program_list', $websiteId);
         $urls = array();
         $urls[] = new Oara_Curl_Request('http://www.clixgalore.co.uk/AffiliatePaymentDetail.aspx', $paymentExport);
         $exportReport = $this->_client->post($urls);
         $dom = new Zend_Dom_Query($exportReport[0]);
         $results = $dom->query('#dg_payments');
         $count = count($results);
         if ($count == 1) {
             $exportData = self::htmlToCsv(self::DOMinnerHTML($results->current()));
             for ($j = 1; $j < count($exportData) - 1; $j++) {
                 $paymentExportArray = str_getcsv($exportData[$j], ";");
                 $obj = array();
                 $paymentDate = new Zend_Date($paymentExportArray[0], "MMM d yyyy", "en");
                 $obj['date'] = $paymentDate->toString("yyyy-MM-dd HH:mm:ss");
                 $obj['pid'] = $paymentDate->toString("yyyyMMdd");
                 $obj['method'] = 'BACS';
                 if (preg_match("/[-+]?[0-9]*,?[0-9]*\\.?[0-9]+/", $paymentExportArray[2], $matches)) {
                     $obj['value'] = Oara_Utilities::parseDouble($matches[0]);
                 } else {
                     throw new Exception("Problem reading payments");
                 }
                 $paymentHistory[] = $obj;
             }
         }
     }
     return $paymentHistory;
 }
开发者ID:netzkind,项目名称:php-oara,代码行数:47,代码来源:ClixGalore.php

示例15: getMerchantExport

 /**
  * Gets all the merchants and returns them in an array.
  * @return array
  */
 private function getMerchantExport()
 {
     $merchantReportList = array();
     $valuesFromExport = $this->_exportMerchantParameters;
     $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;
 }
开发者ID:shivsoji,项目名称:php-oara,代码行数:25,代码来源:CommissionJunction.php


注:本文中的unknown_type::post方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。