private function processAllRefunds() { $targetTime = new Gpf_DateTime(); $targetTime->addMonth(-Gpf_Settings::get(ccBill_Config::PROCESS_REBILL_TIMEFRAME)); $targetTimeFlag = strftime('%Y%m%d', $targetTime->toTimeStamp()); while ($targetTimeFlag != $this->getTimeProgress()) { Gpf_Log::debug('ccBill rebill process task progress: ' . $this->getTimeProgress()); $progress = $this->getProgress(); $ansver = $this->getTransactionsListForPeriod($progress); if (strpos($ansver, 'Too many requests')) { Gpf_Log::debug('Postponding task for one more hour'); $this->interrupt(3700); } else { $this->processCsvList($ansver); } $this->setProgress($this->getNextTimeProgress($progress)); } }