/** * @return void */ protected function confirmOrderApiCall() { $api = new Shipping\PitneyBowesApiFacade(\XLite\Module\XC\PitneyBowes\Model\Shipping\Processor\PitneyBowes::getProcessorConfiguration()); $confirmOrderResult = $api->confirmOrder($this->getPbOrder()); if ($confirmOrderResult) { $this->confirmOrderHistoryEvent($this->getPbOrder(), $confirmOrderResult); } $this->setShippingStatus(\XLite\Model\Order\Status\Shipping::STATUS_PROCESSING); }
/** * Internal unconditional getRates() part * * @param \XLite\Logic\Order\Modifier\Shipping $inputData Shipping order modifier or array of data for request * * @return array */ protected function getGuaranteedRatesFromServer($inputData) { $rates = array(); if ($inputData && !empty($inputData)) { $result = static::$api->createOrder($inputData); $rates = $result['rates']; if ($rates) { $inputData->getOrder()->updatePBOrder($result['orders']); } } elseif (\XLite\Module\XC\PitneyBowes\Main::isStrictMode()) { $this->errorMsg = 'Wrong input data'; } return $rates; }