public function process() { if ($this->isRealTime()) { try { parent::process(); } catch (\Ess\M2ePro\Model\Exception\Connection $exception) { if ($this->account->getChildObject()->isModeSandbox()) { throw $exception; } $this->processResponser(); } catch (\Exception $exception) { if (strpos($exception->getMessage(), 'code:34') === false || $this->account->getChildObject()->isModeSandbox()) { throw $exception; } $this->processResponser(); } if ($this->getResponser()->getStatus() != \Ess\M2ePro\Helper\Data::STATUS_SUCCESS) { $this->getLogger()->setStatus($this->getResponser()->getStatus()); } $this->params['logs_action_id'] = $this->getResponser()->getLogsActionId(); return; } $this->eventBeforeExecuting(); $this->getProcessingRunner()->start(); }
protected function getResponserParams() { $stateItemsData = array(); foreach ($this->pickupStoreStateItems as $id => $stateItem) { $stateItemsData[$id] = array('online_qty' => $stateItem->getOnlineQty(), 'target_qty' => $stateItem->getTargetQty(), 'is_added' => $stateItem->getIsAdded(), 'is_deleted' => $stateItem->getIsDeleted()); } return array_merge(parent::getResponserParams(), array('pickup_store_state_items' => $stateItemsData, 'logs_action_id' => $this->params['logs_action_id'])); }