예제 #1
0
 public function process()
 {
     if (!$this->isNeedSendRequest()) {
         $this->status = \Ess\M2ePro\Helper\Data::STATUS_ERROR;
         return;
     }
     parent::process();
     foreach ($this->getResponse()->getMessages()->getEntities() as $message) {
         if (!$message->isError()) {
             continue;
         }
         $this->status = \Ess\M2ePro\Helper\Data::STATUS_ERROR;
         $this->order->addErrorLog('eBay Order status was not updated. Reason: %msg%', array('msg' => $message->getText()));
     }
 }
예제 #2
0
 public function process()
 {
     if (!$this->isNeedSendRequest()) {
         return;
     }
     parent::process();
     foreach ($this->getResponse()->getMessages()->getEntities() as $message) {
         if (!$message->isError()) {
             continue;
         }
         $this->orderItem->getOrder()->addErrorLog('Unpaid Item Process was not open for Item #%id%. Reason: %msg%', array('!id' => $this->orderItem->getChildObject()->getItemId(), 'msg' => $message->getText()));
         if (in_array($message->getCode(), array(16207, 16212))) {
             $this->orderItem->setData('unpaid_item_process_state', \Ess\M2ePro\Model\Ebay\Order\Item::UNPAID_ITEM_PROCESS_OPENED);
             $this->orderItem->save();
         }
     }
     return;
 }
예제 #3
0
 protected function appendStartDateEndDateValues($data, $response)
 {
     if (isset($response['ebay_start_date_raw'])) {
         $data['start_date'] = \Ess\M2ePro\Model\Ebay\Connector\Command\RealTime::ebayTimeToString($response['ebay_start_date_raw']);
     }
     if (isset($response['ebay_end_date_raw'])) {
         $data['end_date'] = \Ess\M2ePro\Model\Ebay\Connector\Command\RealTime::ebayTimeToString($response['ebay_end_date_raw']);
     }
     return $data;
 }
예제 #4
0
 protected function buildConnectionInstance()
 {
     $connection = parent::buildConnectionInstance();
     $connection->setTimeout(30);
     return $connection;
 }
예제 #5
0
 private function prepareToTime()
 {
     $operationHistory = $this->getActualOperationHistory()->getParentObject('synchronization');
     if (!is_null($operationHistory)) {
         $toTime = $operationHistory->getData('start_date');
     } else {
         $toTime = new \DateTime('now', new \DateTimeZone('UTC'));
     }
     return \Ess\M2ePro\Model\Ebay\Connector\Command\RealTime::ebayTimeToString($toTime);
 }
예제 #6
0
 private function getProductDatesChanges(\Ess\M2ePro\Model\Listing\Product $listingProduct, array $change)
 {
     return array('start_date' => \Ess\M2ePro\Model\Ebay\Connector\Command\RealTime::ebayTimeToString($change['startTime']), 'end_date' => \Ess\M2ePro\Model\Ebay\Connector\Command\RealTime::ebayTimeToString($change['endTime']));
 }