当前位置: 首页>>代码示例>>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;未经允许,请勿转载。