當前位置: 首頁>>代碼示例>>PHP>>正文


PHP HTTPRequest::asyncRequest方法代碼示例

本文整理匯總了PHP中HTTPRequest::asyncRequest方法的典型用法代碼示例。如果您正苦於以下問題:PHP HTTPRequest::asyncRequest方法的具體用法?PHP HTTPRequest::asyncRequest怎麽用?PHP HTTPRequest::asyncRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在HTTPRequest的用法示例。


在下文中一共展示了HTTPRequest::asyncRequest方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionRefund

 public function actionRefund($order_id)
 {
     Yii::log('Ready to refund for order[' . $order_id . '].', CLogger::LEVEL_INFO);
     $data = array_merge(array(), array('order_id' => $order_id));
     $url = Yii::app()->createAbsoluteUrl('payGate/refund', $data);
     Yii::log('Refund request url:[' . $url . ']', CLogger::LEVEL_INFO);
     $result = HTTPRequest::asyncRequest($url, 10);
     var_dump($result);
 }
開發者ID:Veaer,項目名稱:StoryAppendDemo-Server,代碼行數:9,代碼來源:TestCommand.php

示例2: actionRefund

 public function actionRefund($order_id = 0, $force = 0)
 {
     //-------------------------------------
     // 退款狀態檢查
     //-------------------------------------
     $sql = 'SELECT o.order_id, op.product_id, op.order_product_id, op.supplier_order_id,op.tour_date ';
     $sql .= 'FROM `ht_order` o ';
     $sql .= 'LEFT JOIN ht_order_product op ON o.order_id=op.order_id ';
     $sql .= 'LEFT JOIN ht_product p ON op.product_id=p.product_id ';
     $sql .= 'WHERE o.status_id in (' . HtOrderStatus::ORDER_REFUND_PROCESSING . ') ';
     $sql .= 'AND o.payment_method IN ("weixinpay_widget","weixinpay_pc","bocpay_pc","bocpay_wap") ';
     if (!empty($order_id)) {
         $sql .= 'AND o.order_id="' . $order_id . '" ';
     }
     if (!$force) {
         $sql .= 'AND TIMESTAMPDIFF(SECOND,o.date_modified,NOW()) > ' . $this->CHECK_INTERVAL;
     }
     $result = Yii::app()->db->createCommand($sql)->queryAll();
     if ($result && count($result) > 0) {
         foreach ($result as $rkey => $order) {
             $order_id = $order['order_id'];
             $url = Yii::app()->createAbsoluteUrl('payGate/refundNotify/order_id/' . $order_id);
             $result = HTTPRequest::asyncRequest($url . '?refundnotify=1', 10);
         }
     }
 }
開發者ID:Veaer,項目名稱:StoryAppendDemo-Server,代碼行數:26,代碼來源:CheckCommand.php


注:本文中的HTTPRequest::asyncRequest方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。