Пример #1
0
 public function __construct(array $params = array(), Ess_M2ePro_Model_EbayListings $ebayListing)
 {
     $defaultParams = array();
     $params = array_merge($defaultParams, $params);
     if (isset($params['logs_action_id'])) {
         $this->logsActionId = (int) $params['logs_action_id'];
         unset($params['logs_action_id']);
     } else {
         $this->logsActionId = Mage::getModel('M2ePro/EbayListingsLogs')->getNextActionId();
     }
     $this->ebayListing = $ebayListing;
     parent::__construct($params, $this->ebayListing->getMarketplace(), $this->ebayListing->getAccount(), NULL);
 }
Пример #2
0
 protected function getRequestData()
 {
     $requestData = array();
     $requestData['account'] = $this->order->getAccount()->getServerHash();
     $requestData['action'] = $this->action;
     if ($this->order->isCombined()) {
         $requestData['order_id'] = $this->order->getData('ebay_order_id');
     } else {
         $orderId = $this->order->getData('ebay_order_id');
         $orderIdParts = explode('-', $orderId);
         $requestData['item_id'] = $orderIdParts[0];
         $requestData['transaction_id'] = $orderIdParts[1];
     }
     return $requestData;
 }