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


PHP Log::DEBUG方法代码示例

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


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

示例1: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     Log::DEBUG("call back:" . json_encode($data));
     $notfiyOutput = array();
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     if (!$this->Queryorder($data["transaction_id"])) {
         $msg = "订单查询失败";
         return false;
     }
     if (!array_key_exists("out_trade_no", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     $out_trade_no = $data['out_trade_no'];
     $attach = $data['attach'];
     list($_, $charge_type, $uid, $obj_id, $order_id, $model_id) = explode('-', $attach, 6);
     $echomsg = 'error';
     if ($_ == 'charge') {
         $fac_obj = new pay_return_fac_class($charge_type, $model_id, $uid, $obj_id, $order_id, floatval($data['total_fee'] / 100), 'wxpay', $out_trade_no);
         $response = $fac_obj->load();
     }
     return true;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:26,代码来源:notify.php

示例2: comformPay

 private function comformPay($orderNo, $type, $payInfo)
 {
     $m = M('Company_order');
     \Log::DEBUG($orderNo);
     $opt['orderNo'] = $orderNo;
     $result = $m->where($opt)->find();
     if ($result) {
         if ($result['payInfo']) {
             return true;
         }
         if ($type == 'topup') {
             $option['payInfo'] = json_encode($payInfo);
             $option['state'] = 1;
             $option['id'] = $result['id'];
             $row = $m->save($option);
             S('pay_' . $orderNo, 1, 600);
             $topup = json_decode($result['goods'], true);
             $topupCount = intval($topup['amount']) + intval($topup['present']);
             $this->updateUserTopup($result['uId'], $topupCount);
             $log = array("userId" => $result['uId'], "amount" => $topup['amount'], "present" => $topup['present'], "topuptime" => date("Y-m-d H:i:s"), "payType" => 'wechat', "orderNo" => $orderNo);
             $this->topupLog($log);
         }
         if ($type == 'goods') {
             $payTemp = json_decode($result['payTemp']['items'], true);
             $payTemp[count($payTemp)] = $payInfo;
             $option['payInfo'] = json_encode($payTemp);
             \Log::DEBUG($option['payInfo']);
             $option['state'] = 1;
             $option['id'] = $result['id'];
             $row = $m->save($option);
             S('pay_' . $orderNo, 1, 600);
             $this->sendOrderMsg($result);
         }
     }
 }
开发者ID:superSN,项目名称:tyrolland,代码行数:35,代码来源:Notify.class.php

示例3: Queryorder

 /**
  * @brief 查询订单状态
  *
  * @param int $transaction_id 交易号
  * @return bool 订单是否支付成功 
  * @see 
  * @note 
  * @author 吕宝贵
  * @date 2015/12/18 10:47:15
  **/
 public function Queryorder($transaction_id)
 {
     $input = new WxPayOrderQuery();
     $input->SetTransaction_id($transaction_id);
     $result = WxPayApi::orderQuery($input);
     Log::DEBUG("query:" . json_encode($result));
     if (array_key_exists("return_code", $result) && array_key_exists("result_code", $result) && $result["return_code"] == "SUCCESS" && $result["result_code"] == "SUCCESS") {
         return true;
     }
     return false;
 }
开发者ID:xiejianxuan5,项目名称:yii2-payment,代码行数:21,代码来源:WechatPayNotify.php

示例4: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     Log::DEBUG("call back:" . json_encode($data));
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     //查询订单,判断订单真实性
     if (!$this->Queryorder($data["transaction_id"])) {
         $msg = "订单查询失败";
         return false;
     }
     $url = "120.27.199.121";
     $fp = fsockopen($url, 80, $errno, $errstr, 30);
     if (!$fp) {
         //echo "$errstr ($errno)<br />\n";
     } else {
         $out = "GET /feise/public/notify/wx_callback?out_trade_no=" . $data['out_trade_no'] . "&key=qj7adNDy6AdHB7SD HTTP/1.1\r\n";
         $out .= "Host: 120.27.199.121\r\n";
         $out .= "Connection: Close\r\n\r\n";
         fwrite($fp, $out);
         //            while (!feof($fp)) {
         //                echo fgets($fp, 128);
         //            }
         fclose($fp);
     }
     //根据订单号判定用户数据
     //        $servername = "120.27.199.121";
     //        $username = "root";
     //        $password = "mypassword";
     //        $dbname = "feise";
     //
     //        // Create connection
     //        $conn = new mysqli($servername, $username, $password, $dbname);
     //        // Check connection
     //        if ($conn->connect_error) {
     //            die("Connection failed: " . $conn->connect_error);
     //        }
     //
     //        $sql = "UPDATE orders SET status=1,payment_time='".date("Y-m-d H:i:s",time())."' WHERE out_trade_no='".$data['out_trade_no']."'";
     //
     //        if ($conn->query($sql) === TRUE) {
     //            $conn->close();
     //            return true;
     //        } else {
     //            $conn->close();
     //            return false;
     //        }
 }
开发者ID:Lazybin,项目名称:huisa,代码行数:49,代码来源:WxNotifyDeal.php

示例5: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     Log::DEBUG("call back:" . json_encode($data));
     $notfiyOutput = array();
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     //查询订单,判断订单真实性
     if (!$this->Queryorder($data["transaction_id"])) {
         $msg = "订单查询失败";
         return false;
     }
     return true;
 }
开发者ID:blackloong,项目名称:Web,代码行数:15,代码来源:WxPayNotify.php

示例6: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     Log::DEBUG("call back:" . json_encode($data));
     $notfiyOutput = array();
     $this->request_data = $data;
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确,transaction_id不存在";
         return false;
     }
     // 查询订单,判断订单真实性
     if (!$this->Queryorder($data)) {
         $msg = "订单查询失败";
         return false;
     }
     // 纪录错误信息
     if (!empty($msg) && $msg !== 'OK') {
         Log::ERROR(sprintf('call NotifyProcess error::%s|file:%s|line:%s', $msg, __FILE__, __LINE__));
     }
     return true;
 }
开发者ID:OranTing,项目名称:gdby_github_repo,代码行数:20,代码来源:notify.php

示例7: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     Log::DEBUG("call back:" . json_encode($data));
     $notfiyOutput = array();
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     //查询订单,判断订单真实性
     if (!$this->Queryorder($data["transaction_id"])) {
         $msg = "订单查询失败";
         return false;
     }
     /*
     $data = array(
     	'transaction_id' => '123',
     	'time_end' => 'abc',
     	'out_order_no' => 'bcd'
     );
     */
     $conn = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("connect failed" . mysql_error());
     mysql_select_db(DB_DATABASENAME, $conn);
     $transaction_id = mysql_real_escape_string($data['transaction_id']);
     $time_end = mysql_real_escape_string($data['time_end']);
     $order_id = mysql_real_escape_string($data['out_trade_no']);
     // 更新订单
     $sql = "update ims_redstar_order set transaction_id='%s', status=1, time_end='%s' ";
     $sql .= " where order_id = '%s'";
     $sql = sprintf($sql, $transaction_id, $time_end, $order_id);
     Log::DEBUG('order:' . $sql);
     mysql_query($sql);
     $sql = "update ims_redstar_reserve set reserve_num = reserve_num - 1";
     Log::DEBUG('order:' . $sql);
     mysql_query($sql);
     mysql_close();
     return true;
 }
开发者ID:randyli,项目名称:redstar,代码行数:37,代码来源:notify.php

示例8: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     //echo "处理回调";
     Log::DEBUG("call back:" . json_encode($data));
     if (!array_key_exists("openid", $data) || !array_key_exists("product_id", $data)) {
         $msg = "回调数据异常";
         return false;
     }
     $openid = $data["openid"];
     $product_id = $data["product_id"];
     //统一下单
     $result = $this->unifiedorder($openid, $product_id);
     if (!array_key_exists("appid", $result) || !array_key_exists("mch_id", $result) || !array_key_exists("prepay_id", $result)) {
         $msg = "统一下单失败";
         return false;
     }
     $this->SetData("appid", $result["appid"]);
     $this->SetData("mch_id", $result["mch_id"]);
     $this->SetData("nonce_str", WxPayApi::getNonceStr());
     $this->SetData("prepay_id", $result["prepay_id"]);
     $this->SetData("result_code", "SUCCESS");
     $this->SetData("err_code_des", "OK");
     return true;
 }
开发者ID:aising,项目名称:ding,代码行数:24,代码来源:native_notify.php

示例9: replyNotify

 /**
  * 直接输出xml
  * @param string $xml
  */
 public static function replyNotify($xml)
 {
     Log::DEBUG($xml);
     echo $xml;
 }
开发者ID:superSN,项目名称:tyrolland,代码行数:9,代码来源:WxPayApi.php

示例10: changeOrderStatusSub

 public function changeOrderStatusSub($id_order)
 {
     Log::DEBUG("change:1." . $id_order);
     if ($id_order) {
         Log::DEBUG("change:2." . $id_order);
         $lastHistory = OrderHistory::getLastOrderState($id_order);
         if ($lastHistory->id == Configuration::get('PS_OS_PAYMENT')) {
             Log::DEBUG("change:2.1." . $id_order);
             return true;
         }
         $history = new OrderHistory();
         $history->id_order = (int) $id_order;
         $history->changeIdOrderState(Configuration::get('PS_OS_PAYMENT'), (int) $id_order);
         Log::DEBUG("change:3." . $id_order);
         if ($history->addWithemail()) {
             Log::DEBUG("change:4." . $id_order);
             return true;
         }
     }
     return false;
 }
开发者ID:yiuked,项目名称:tmcart,代码行数:21,代码来源:notify.php

示例11: receipt_page

 function receipt_page($order)
 {
     if (!$this->qrUrl) {
         Log::DEBUG('Pay order with weChat payment');
         echo '<p>' . __('Please scan the QR code with WeChat to finish the payment.', 'wechatpay') . '</p>';
         $this->genetateQR($order);
     }
 }
开发者ID:zhuhank,项目名称:wechat-payment-for-woocommerce,代码行数:8,代码来源:class-wc-wechatpay.php

示例12: distributeByPriorities

 /**
  * Distribute seats for several courses in a course set using the given
  * user priorities.
  *
  * @param CourseSet $courseSet The course set containing the courses
  * that seats shall be distributed for.
  * @see CourseSet
  */
 private function distributeByPriorities($courseSet)
 {
     Log::DEBUG('start seat distribution for course set: ' . $courseSet->getId());
     $limited_admission = $courseSet->getAdmissionRule('LimitedAdmission');
     //all users with their priorities
     $claiming_users = AdmissionPriority::getPriorities($courseSet->getId());
     //all users which have bonus/malus
     $factored_users = $courseSet->getUserFactorList();
     //all users with their max number of courses
     $max_seats_users = array_combine(array_keys($claiming_users), array_map(function ($u) use($limited_admission) {
         return $limited_admission->getMaxNumberForUser($u);
     }, array_keys($claiming_users)));
     //unlucky users get a bonus for the next round
     $bonus_users = array();
     //users / courses für later waitlist distribution
     $waiting_users = array();
     //number of already distributed seats for users
     $distributed_users = array();
     $prio_mapper = function ($users, $course_id) use($claiming_users) {
         $mapper = function ($u) use($course_id) {
             return isset($u[$course_id]) ? $u[$course_id] : null;
         };
         return array_filter(array_map($mapper, array_intersect_key($claiming_users, array_flip($users))));
     };
     //sort courses by highest count of prio 1 applicants
     $stats = AdmissionPriority::getPrioritiesStats($courseSet->getId());
     $courses = array_map(function ($a) {
         return $a['h'];
     }, $stats);
     arsort($courses, SORT_NUMERIC);
     $max_prio = AdmissionPriority::getPrioritiesMax($courseSet->getId());
     //count already manually distributed places
     $distributed_users = $this->countParticipatingUsers(array_keys($courses), array_keys($claiming_users));
     Log::DEBUG('already distributed users: ' . print_r($distributed_users, 1));
     //walk through all prios with all courses
     foreach (range(1, $max_prio) as $current_prio) {
         foreach (array_keys($courses) as $course_id) {
             $current_claiming = array();
             $course = Course::find($course_id);
             $free_seats = $course->getFreeSeats();
             //find users with current prio for this course, if they still need a place
             foreach ($claiming_users as $user_id => $prio_courses) {
                 if ($prio_courses[$course_id] == $current_prio && $distributed_users[$user_id] < $max_seats_users[$user_id]) {
                     //exclude participants
                     if (!$course->getParticipantStatus($user_id)) {
                         $current_claiming[$user_id] = 1;
                         if (isset($factored_users[$user_id])) {
                             $current_claiming[$user_id] *= $factored_users[$user_id];
                         }
                     } else {
                         Log::DEBUG(sprintf('user %s is already %s in course %s, ignoring', $user_id, $course->getParticipantStatus($user_id), $course->id));
                     }
                 }
             }
             //give maximum bonus to users which were unlucky before
             foreach (array_keys($current_claiming) as $user_id) {
                 if ($bonus_users[$user_id] > 0) {
                     $current_claiming[$user_id] = $bonus_users[$user_id] * count($current_claiming) + 1;
                     $bonus_users[$user_id]--;
                 }
             }
             Log::DEBUG(sprintf('distribute %s seats on %s claiming with prio %s in course %s', $free_seats, count($current_claiming), $current_prio, $course->id));
             Log::DEBUG('users to distribute: ' . print_r($current_claiming, 1));
             $current_claiming = $this->rollTheDice($current_claiming);
             Log::DEBUG('the die is cast: ' . print_r($current_claiming, 1));
             $chosen_ones = array_slice(array_keys($current_claiming), 0, $free_seats);
             Log::DEBUG('chosen ones: ' . print_r($chosen_ones, 1));
             $this->addUsersToCourse($chosen_ones, $course, $prio_mapper($chosen_ones, $course->id));
             foreach ($chosen_ones as $one) {
                 $distributed_users[$one]++;
             }
             if ($free_seats < count($current_claiming)) {
                 $remaining_ones = array_slice(array_keys($current_claiming), $free_seats);
                 foreach ($remaining_ones as $one) {
                     $bonus_users[$one]++;
                     $waiting_users[$current_prio][$course_id][] = $one;
                 }
             }
         }
     }
     //distribute to waitlists if applicable
     Log::DEBUG('waiting list: ' . print_r($waiting_users, 1));
     foreach ($waiting_users as $current_prio => $current_prio_waiting_courses) {
         foreach ($current_prio_waiting_courses as $course_id => $users) {
             $users = array_filter($users, function ($user_id) use($distributed_users, $max_seats_users) {
                 return $distributed_users[$user_id] < $max_seats_users[$user_id];
             });
             $course = Course::find($course_id);
             Log::DEBUG(sprintf('distribute waitlist of %s with prio %s in course %s', count($users), $current_prio, $course->id));
             if (!$course->admission_disable_waitlist) {
                 if ($course->admission_waitlist_max) {
                     $free_seats_waitlist = $course->admission_waitlist_max - $course->getNumWaiting();
//.........这里部分代码省略.........
开发者ID:ratbird,项目名称:hope,代码行数:101,代码来源:RandomAlgorithm.class.php

示例13: NotifyProcess

 public function NotifyProcess($data, &$msg)
 {
     Log::DEBUG("call back:" . json_encode($data));
     $notfiyOutput = array();
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     //查询订单,判断订单真实性
     if (!$this->QueryOrder($data["transaction_id"])) {
         $msg = "订单查询失败";
         return false;
     }
     //将控制权交给用户回调函数
     $b = true;
     if (is_callable($this->_notify_callback)) {
         $b = call_user_func_array($this->_notify_callback, array($data, &$msg));
         //将$msg引用传递下去,便于回调函数改写
     }
     return $b ? true : false;
 }
开发者ID:GavinLai,项目名称:SimMatch,代码行数:21,代码来源:class.Wxpay.php

示例14: WxPayRefund

}
//$_REQUEST["out_trade_no"]= "122531270220150304194108";
///$_REQUEST["total_fee"]= "1";
//$_REQUEST["refund_fee"] = "1";
if (isset($_REQUEST["out_trade_no"]) && $_REQUEST["out_trade_no"] != "") {
    $out_trade_no = $_REQUEST["out_trade_no"];
    $total_fee = $_REQUEST["total_fee"];
    $refund_fee = $_REQUEST["refund_fee"];
    $input = new WxPayRefund();
    $input->SetOut_trade_no($out_trade_no);
    $input->SetTotal_fee($total_fee);
    $input->SetRefund_fee($refund_fee);
    $input->SetOut_refund_no(WxPayConfig::MCHID . date("YmdHis"));
    $input->SetOp_user_id(WxPayConfig::MCHID);
    $result = WxPayApi::refund($input);
    Log::DEBUG("refund:" . json_encode($result));
    echo json_encode($result);
    exit;
}
?>
<!-- <body>  
	<form action="#" method="post">
        <div style="margin-left:2%;color:#f00">微信订单号和商户订单号选少填一个,微信订单号优先:</div><br/>
        <div style="margin-left:2%;">微信订单号:</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" name="transaction_id" /><br /><br />
        <div style="margin-left:2%;">商户订单号:</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" name="out_trade_no" /><br /><br />
        <div style="margin-left:2%;">订单总金额(分):</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" name="total_fee" /><br /><br />
        <div style="margin-left:2%;">退款金额(分):</div><br/>
        <input type="text" style="width:96%;height:35px;margin-left:2%;" name="refund_fee" /><br /><br />
开发者ID:xiaoxianlink,项目名称:weixin,代码行数:31,代码来源:refund.php


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