Esempio n. 1
0
 /**
  * Upload to PB SFTP Server, called from completed.tpl
  *
  * @return boolean
  */
 public function uploadToPB()
 {
     $result = false;
     $generator = $this->getGenerator();
     if ($generator) {
         $config = \XLite\Module\XC\PitneyBowes\Model\Shipping\Processor\PitneyBowes::getProcessorConfiguration();
         $processor = new PitneyBowes\Logic\FileExchange\Processor($config);
         $result = $processor->submitCatalog($generator->getCatalogFiles(), $generator->getOptions()->differential);
         if ($result) {
             \XLite\Core\TmpVars::getInstance()->{\XLite\Module\XC\PitneyBowes\Core\Task\PitneyBowesCatalog::CELL_DIFF_EXTRACTION} = LC_START_TIME;
             if (!$generator->getOptions()->differential) {
                 \XLite\Core\TmpVars::getInstance()->{\XLite\Module\XC\PitneyBowes\Core\Task\PitneyBowesCatalog::CELL_FULL_EXTRACTION} = LC_START_TIME;
             }
         }
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * Checks if PB left some notifications on SFTP
  */
 protected function checkPBNotifications()
 {
     $config = $this->getConfiguration();
     $processor = new PitneyBowes\Logic\FileExchange\Processor($config);
     $processor->checkNotifications();
 }