本文整理汇总了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);
}
示例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);
}
}
}