当前位置: 首页>>代码示例>>PHP>>正文


PHP SoapClient::createOrder方法代码示例

本文整理汇总了PHP中SoapClient::createOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP SoapClient::createOrder方法的具体用法?PHP SoapClient::createOrder怎么用?PHP SoapClient::createOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SoapClient的用法示例。


在下文中一共展示了SoapClient::createOrder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createOrder

 /**
  * @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 createOrder($timestamp, InkRouter_Models_OrderInfo $orderInfo)
 {
     $this->connect();
     try {
         return $this->soapClient->createOrder(array('arg0' => $this->printCustomerId, 'arg1' => $this->secretKey, 'arg2' => $timestamp, 'arg3' => $orderInfo->pack(true)))->return;
     } catch (SoapFault $e) {
         throw InkRouter_Exceptions_SoapFaultAdapter::valueOf($e)->getException();
     }
 }
开发者ID:opensoft,项目名称:inkrouter-php-sdk,代码行数:15,代码来源:SoapClient.php

示例2: actionCreateOrder

 public function actionCreateOrder()
 {
     $bookId = Yii::app()->request->getParam('book_id');
     $count = Yii::app()->request->getParam('count');
     $bookInfo = '';
     if (!empty($bookId) && !empty($count)) {
         $client = new SoapClient($this->baseUrl . '/index.php/orders/quote');
         $bookInfo = $client->createOrder($bookId, $count);
     }
     $this->render('order_create', array('info' => $bookInfo));
 }
开发者ID:norv95,项目名称:kmptest,代码行数:11,代码来源:SoapClientController.php

示例3: makeRequestSoap

 public function makeRequestSoap($params)
 {
     // Test server url: http://packandship-ws-test.kiala.com/psws-web-1.0.0/order?wsdl
     $client = new SoapClient(Configuration::get('KIALASMALL_WS_URL'), array('trace' => true, 'exceptions' => false));
     $result = $client->createOrder($params);
     if (isset($result->trackingNumber)) {
         return $result->trackingNumber;
     } else {
         // Uncomment for debug mode
         /*
         p('KIALASMALL error - [SOAP]: '.$result->getMessage()
           .' [faultCode]: '.(isset($result->detail->orderFault->faultCode) ? $result->detail->orderFault->faultCode : '')
           .' [message]: '.(isset($result->detail->orderFault->message) ? $result->detail->orderFault->message : '')
         );
         echo htmlentities($client->__getLastRequest());
         die();
         */
         Logger::addLog('KIALASMALL error - [SOAP]: ' . $result->getMessage() . ' [faultCode]: ' . $result->detail->orderFault->faultCode . ' [message]: ' . $result->detail->orderFault->message, 4, 1, null, null, true);
     }
     return false;
 }
开发者ID:ventsiwad,项目名称:presta_addons,代码行数:21,代码来源:SmKialaRequest.php

示例4: createOrder

 /**
  * @see EPSInterface::createOrder()
  */
 public function createOrder($sessionId, $order)
 {
     try {
         $createOrderStdObject = new stdClass();
         $createOrderStdObject->sessionId = $sessionId;
         $createOrderStdObject->order = $order->toStdClass();
         $response = parent::createOrder($createOrderStdObject);
         $arrCreateOrder = array();
         if (isset($response->return)) {
             $arrStdCreateOrder = $response->return;
             if (is_array($arrStdCreateOrder)) {
                 for ($i = 0; $i < count($arrStdCreateOrder); $i++) {
                     $arrCreateOrder[$i] = new ResultOrderPickingInfo($arrStdCreateOrder[$i]);
                 }
             } else {
                 $arrCreateOrder[0] = new ResultOrderPickingInfo($arrStdCreateOrder);
             }
         }
         return $arrCreateOrder;
     } catch (SoapFault $sf) {
         throw new ServerException($sf);
     }
 }
开发者ID:fire1,项目名称:speedy,代码行数:26,代码来源:EPSSOAPInterfaceImpl.class.php

示例5: dolibarr_create_order

 /**
  * Hooks on process_checkout()
  *
  * While the order is processed, use the data to create a Dolibarr order via webservice
  *
  * @return void
  */
 public function dolibarr_create_order()
 {
     /*
      * We use non WSDL mode to workaround Dolibarr broken declaration marking all the fields as required
      * when they're not.
      */
     try {
         $soap_client = new SoapClient(null, array('location' => $this->ws_endpoint . self::ORDER_ENDPOINT, 'uri' => 'http://www.dolibar.org/ns/'));
     } catch (SoapFault $exception) {
         $this->logger->add('doliwoo', $exception->getMessage());
         // Do nothing.
         return;
     }
     $order = new Dolibarr_Order();
     // Fill this array with all data required to create an order in Dolibarr
     $user_id = get_current_user_id();
     if ('' == $user_id) {
         // default to the generic user
         $thirdparty_id = $this->settings->dolibarr_generic_id;
     } else {
         $thirdparty_id = get_user_meta($user_id, 'dolibarr_id', true);
     }
     if ('' != $thirdparty_id) {
         $order->thirdparty_id = intval($thirdparty_id);
     } else {
         if (get_user_meta($user_id, 'billing_company', true) == '') {
             update_user_meta($user_id, 'billing_company', $_POST['billing_company']);
         }
         $this->dolibarr_create_thirdparty_if_not_exists($user_id);
         $order->thirdparty_id = intval(get_user_meta($user_id, 'dolibarr_id', true));
     }
     $order->date = date('Ymd');
     $order->status = 1;
     $this->create_order_lines($order);
     try {
         $result = $soap_client->createOrder($this->ws_auth, $order);
     } catch (SoapFault $exception) {
         $this->logger->add('doliwoo', 'createOrder request:' . $exception->getMessage());
         // Do nothing.
         return;
     }
     if (!('OK' == $result['result']->result_code)) {
         $this->logger->add('doliwoo', 'createOrder response: ' . $result['result']->result_code . ': ' . $result['result']->result_label);
         // Do nothing
         return;
     }
 }
开发者ID:gpcsolutions,项目名称:doliwoo,代码行数:54,代码来源:class-dolibarr.php


注:本文中的SoapClient::createOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。