/**
  * @param int $orderId
  * @param int $timestamp
  * @return mixed
  * @throws InkRouter_Exceptions_InkRouterNotAvailableException|InkRouter_Exceptions_AuthenticationException|InkRouter_Exceptions_ProcessingException|InkRouter_Exceptions_RejectionException
  */
 public function cancelOrder($orderId, $timestamp)
 {
     $this->connect();
     try {
         return $this->soapClient->cancelOrder(array('arg0' => $this->printCustomerId, 'arg1' => $this->secretKey, 'arg2' => $orderId, 'arg3' => $timestamp))->return;
     } catch (SoapFault $e) {
         throw InkRouter_Exceptions_SoapFaultAdapter::valueOf($e)->getException();
     }
 }
Example #2
0
 public function actionCancelOrder()
 {
     $orderId = Yii::app()->request->getParam('order_id');
     if (!empty($orderId)) {
         $client = new SoapClient($this->baseUrl . '/index.php/orders/quote');
         $result = $client->cancelOrder($orderId);
         if ($result == true) {
             $info = 'Заказ № ' . $orderId . ' отменён';
         } else {
             $info = 'Невозможно отменить заказ № ' . $orderId;
         }
     }
     $this->render('order_cancel', array('info' => $info));
 }