コード例 #1
0
 /**
  * @param int $orderId
  * @param int $timestamp
  * @param InkRouter_Models_OrderInfo $orderInfo
  * @return mixed
  * @throws InkRouter_Exceptions_InkRouterNotAvailableException|InkRouter_Exceptions_AuthenticationException|InkRouter_Exceptions_ProcessingException|InkRouter_Exceptions_RejectionException
  */
 public function updateOrder($orderId, $timestamp, InkRouter_Models_OrderInfo $orderInfo)
 {
     return $this->sendRequest(sprintf($this->baseUrl . self::$UPDATE_PATH, $orderId, $timestamp), 'PUT', array('Content-Type: application/xml'), $orderInfo->pack());
 }
コード例 #2
0
 public function testPackWithoutRoot()
 {
     $this->assertXmlStringEqualsXmlFile(dirname(__FILE__) . '/../fixtures/order_info.xml', $this->orderInfo->pack());
 }
コード例 #3
0
 /**
  * @param int $orderId
  * @param int $timestamp
  * @param InkRouter_Models_OrderInfo $orderInfo
  * @return mixed
  * @throws InkRouter_Exceptions_InkRouterNotAvailableException|InkRouter_Exceptions_AuthenticationException|InkRouter_Exceptions_ProcessingException|InkRouter_Exceptions_RejectionException
  */
 public function updateOrder($orderId, $timestamp, InkRouter_Models_OrderInfo $orderInfo)
 {
     $this->connect();
     try {
         return $this->soapClient->updateOrder(array('arg0' => $this->printCustomerId, 'arg1' => $this->secretKey, 'arg2' => $orderId, 'arg3' => $timestamp, 'arg4' => $orderInfo->pack()))->return;
     } catch (SoapFault $e) {
         throw InkRouter_Exceptions_SoapFaultAdapter::valueOf($e)->getException();
     }
 }