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


PHP log_result函数代码示例

本文整理汇总了PHP中log_result函数的典型用法代码示例。如果您正苦于以下问题:PHP log_result函数的具体用法?PHP log_result怎么用?PHP log_result使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: notify_verify

    function notify_verify() {
        //获取远程服务器ATN结果,验证是否是支付宝服务器发来的请求
        if($this->transport == "https") {
            $veryfy_url = $this->gateway. "service=notify_verify" ."&partner=" .$this->partner. "&notify_id=".$_POST["notify_id"];
        } else {
            $veryfy_url = $this->gateway. "partner=".$this->partner."&notify_id=".$_POST["notify_id"];
        }
        $veryfy_result = $this->get_verify($veryfy_url);

        //生成签名结果
		if(empty($_POST)) {							//判断POST来的数组是否为空
			return false;
		}
		else {
			$post          = para_filter($_POST);	//对所有POST返回的参数去空
			$sort_post     = arg_sort($post);	    //对所有POST反馈回来的数据排序
			$this->mysign  = build_mysign($sort_post,$this->_key,$this->sign_type);   //生成签名结果
	
			//写日志记录
			log_result("veryfy_result=".$veryfy_result."\n notify_url_log:sign=".$_POST["sign"]."&mysign=".$this->mysign.",".create_linkstring($sort_post));
	
			//判断veryfy_result是否为ture,生成的签名结果mysign与获得的签名结果sign是否一致
			//$veryfy_result的结果不是true,与服务器设置问题、合作身份者ID、notify_id一分钟失效有关
			//mysign与sign不等,与安全校验码、请求时的参数格式(如:带自定义参数等)、编码格式有关
			if (preg_match("/true$/i",$veryfy_result) && $this->mysign == $_POST["sign"]) {
				return true;
			} else {
				return false;
			}
		}
    }
开发者ID:RenzcPHP,项目名称:3dproduct,代码行数:31,代码来源:alipay_notify.php

示例2: build_mysign

function build_mysign($sort_array, $key, $sign_type = "MD5")
{
    $prestr = create_linkstring($sort_array);
    $prestr = $prestr . $key;
    log_result("sign : " . $prestr);
    $mysgin = sign($prestr, $sign_type);
    return $mysgin;
}
开发者ID:haibocu,项目名称:lifark,代码行数:8,代码来源:alipay_function.php

示例3: verify_post

function verify_post($order_data, $key)
{
    log_result(json_encode($order_data));
    log_result($key);
    if ($order_data['money'] > 0 && !empty($order_data['ddh']) && !empty($order_data['key']) && $order_data['key'] == $key) {
        if (strpos($order_data['name'], 'whmcs_') === 0) {
            $invoiceid = (int) substr($order_data['name'], strlen('whmcs_'));
            if ($invoiceid > 0) {
                $order_data['invoice_id'] = $invoiceid;
                $order_data['status'] = 'success';
                log_result($order_data);
                return $order_data;
            }
        }
    }
    return false;
}
开发者ID:falseen,项目名称:whmcs-alipay-python,代码行数:17,代码来源:alipaypersonal_callback.php

示例4: return_verify

 function return_verify()
 {
     if ($this->transport == "https") {
         $veryfy_url = $this->gateway . "service=notify_verify" . "&partner=" . $this->partner . "&notify_id=" . $_GET["notify_id"];
     } else {
         $veryfy_url = $this->gateway . "partner=" . $this->partner . "&notify_id=" . $_GET["notify_id"];
     }
     $veryfy_result = $this->get_verify($veryfy_url);
     if (empty($_GET)) {
         return false;
     } else {
         $get = para_filter($_GET);
         $sort_get = arg_sort($get);
         $this->mysign = build_mysign($sort_get, $this->security_code, $this->sign_type);
         log_result("veryfy_result=" . $veryfy_result . "\n return_url_log:sign=" . $_GET["sign"] . "&mysign=" . $this->mysign . "&" . create_linkstring($sort_get));
         if (preg_match("/true\$/i", $veryfy_result) && $this->mysign == $_GET["sign"]) {
             return true;
         } else {
             return false;
         }
     }
 }
开发者ID:keyu199314,项目名称:php,代码行数:22,代码来源:alipay_notify.php

示例5: get_verify

 function get_verify($url, $time_out = "60")
 {
     $urlarr = parse_url($url);
     $errno = "";
     $errstr = "";
     $transports = "";
     if ($urlarr["scheme"] == "https") {
         $transports = "ssl://";
         $urlarr["port"] = "443";
     } else {
         $transports = "tcp://";
         $urlarr["port"] = "80";
     }
     $fp = @fsockopen($transports . $urlarr['host'], $urlarr['port'], $errno, $errstr, $time_out);
     if (!$fp) {
         die("ERROR: {$errno} - {$errstr}<br />\n");
     } else {
         fputs($fp, "POST " . $urlarr["path"] . " HTTP/1.1\r\n");
         fputs($fp, "Host: " . $urlarr["host"] . "\r\n");
         fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
         fputs($fp, "Content-length: " . strlen($urlarr["query"]) . "\r\n");
         fputs($fp, "Connection: close\r\n\r\n");
         fputs($fp, $urlarr["query"] . "\r\n\r\n");
         while (!feof($fp)) {
             $info[] = @fgets($fp, 1024);
         }
         fclose($fp);
         $info = implode(",", $info);
         while (list($key, $val) = each($_POST)) {
             $arg .= $key . "=" . $val . "&";
         }
         //**********************************ÉÏÃæдÈÕÖ¾
         log_result("log=" . $url . $this->charset_decode($info, $this->_input_charset));
         log_result("log=" . $this->charset_decode($arg, $this->_input_charset));
         return $info;
         //**********************************ÉÏÃæдÈÕÖ¾
     }
 }
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:38,代码来源:alipay_notify.php

示例6: notify_verify

 function notify_verify()
 {
     if (isset($_POST['notify_id'])) {
         $notify_id = $_POST['notify_id'];
     } else {
         $notify_id = '';
     }
     if ($this->transport == "https") {
         $veryfy_url = $this->gateway . "service=notify_verify" . "&partner=" . $this->partner . "&notify_id=" . $notify_id;
     } else {
         $veryfy_url = $this->gateway . "partner=" . $this->partner . "&notify_id=" . $notify_id;
     }
     $veryfy_result = $this->get_verify($veryfy_url);
     log_result("Aplipay veryfy -  veryfy_url = " . $veryfy_url);
     if (empty($_POST)) {
         log_result("Aplipay veryfy -  empty(post)");
         return false;
     } else {
         $post = para_filter($_POST);
         //������POST���صIJ���ȥ��
         $sort_post = arg_sort($post);
         //������POST�����������������
         log_result("Aplipay veryfy build_mysign - key = " . $this->_key . " sign_type" . $this->sign_type);
         $this->mysign = build_mysign($sort_post, $this->_key, $this->sign_type);
         //���ǩ����
         //д��־��¼
         log_result("veryfy_result=" . $veryfy_result . "\n notify_url_log:sign=" . $_POST['sign'] . "&mysign=" . $this->mysign . "," . create_linkstring($sort_post));
         //�ж�veryfy_result�Ƿ�Ϊture����ɵ�ǩ����mysign���õ�ǩ����sign�Ƿ�һ��
         //$veryfy_result�Ľ����true����������������⡢���������ID��notify_idһ����ʧЧ�й�
         //mysign��sign���ȣ��밲ȫУ���롢����ʱ�IJ����ʽ���磺���Զ������ȣ��������ʽ�й�
         if (preg_match("/true\$/i", $veryfy_result) && $this->mysign == $_POST['sign']) {
             return true;
         } else {
             return false;
         }
     }
 }
开发者ID:haibocu,项目名称:lifark,代码行数:37,代码来源:alipay_notify.php

示例7: aaa

 public function aaa()
 {
     $data = log_result();
     $str = '2015255';
     $reg = "/^2015/";
     if (!preg_match_all($reg, $str, $arr)) {
         $this->ajaxReturn(['status' => 111, 'info' => '你不是小鲜肉']);
     }
 }
开发者ID:RedrockTeam,项目名称:stuface,代码行数:9,代码来源:IndexController.class.php

示例8: log_result

<META http-equiv=Content-Type content="text/html; charset=utf-8">
<?php 
//---------------------------------------------------------
//财付通即时到帐支付页面回调示例,商户按照此文档进行开发即可
//---------------------------------------------------------
require_once MAIN_ . "lib/tenpay_web/classes/ResponseHandler.class.php";
require_once MAIN_ . "lib/tenpay_web/classes/function.php";
require_once "./tenpay_config.php";
log_result("进入前台回调页面");
/* 创建支付应答对象 */
$resHandler = new ResponseHandler();
$resHandler->setKey($key);
//判断签名
if ($resHandler->isTenpaySign()) {
    //通知id
    $notify_id = $resHandler->getParameter("notify_id");
    //商户订单号
    $out_trade_no = $resHandler->getParameter("out_trade_no");
    //财付通订单号
    $transaction_id = $resHandler->getParameter("transaction_id");
    //金额,以分为单位
    $total_fee = $resHandler->getParameter("total_fee");
    //如果有使用折扣券,discount有值,total_fee+discount=原请求的total_fee
    $discount = $resHandler->getParameter("discount");
    //支付结果
    $trade_state = $resHandler->getParameter("trade_state");
    //交易模式,1即时到账
    $trade_mode = $resHandler->getParameter("trade_mode");
    if ("1" == $trade_mode) {
        if ("0" == $trade_state) {
            echo "<br/>" . "即时到帐支付成功" . "<br/>";
开发者ID:buziyborni,项目名称:cnode-cc,代码行数:31,代码来源:payReturnUrl.php

示例9: imagecreatefromjpeg

//原始图片比较大,压缩一下. 效果还是很明显的, 使用80%的压缩率肉眼基本没有什么区别
$avtar_img = imagecreatefromjpeg(SD_ROOT . './' . $new_avatar_path);
imagejpeg($avtar_img, SD_ROOT . './' . $new_avatar_path, 80);
//nix系统下有必要时可以使用 chmod($filename,$permissions);
log_result('图片大小: ' . $len);
//输出新保存的图片位置, 测试时注意改一下域名路径, 后面的statusText是成功提示信息.
//status 为1 是成功上传,否则为失败.
$d = new pic_data();
$d->data->photoId = $pic_id;
//$d->data->urls[0] = 'http://sns.com/avatar_test/'.$new_avatar_path;
$d->data->urls[0] = '/avatar_test/' . $new_avatar_path;
$d->status = 1;
$d->statusText = '上传成功!';
$msg = json_encode($d);
echo $msg;
log_result($msg);
function log_result($word)
{
    @($fp = fopen("log.txt", "a"));
    @flock($fp, LOCK_EX);
    @fwrite($fp, $word . ":执行日期:" . strftime("%Y%m%d%H%I%S", time()) . "\r\n");
    @flock($fp, LOCK_UN);
    @fclose($fp);
}
class pic_data
{
    public $data;
    public $status;
    public $statusText;
    public function __construct()
    {
开发者ID:hdbaiyu,项目名称:Project-FE,代码行数:31,代码来源:camera.php

示例10: notify

 public function notify()
 {
     vendor('WxPayPubHelper.WxPayPubHelper');
     //使用通用通知接口
     $notify = new \Notify_pub();
     //存储微信的回调
     $xml = $GLOBALS['HTTP_RAW_POST_DATA'];
     $notify->saveData($xml);
     //验证签名,并回应微信。
     //对后台通知交互时,如果微信收到商户的应答不是成功或超时,微信认为通知失败,
     //微信会通过一定的策略(如30分钟共8次)定期重新发起通知,
     //尽可能提高通知的成功率,但微信不保证通知最终能成功。
     if ($notify->checkSign() == FALSE) {
         $notify->setReturnParameter("return_code", "FAIL");
         //返回状态码
         $notify->setReturnParameter("return_msg", "签名失败");
         //返回信息
     } else {
         $notify->setReturnParameter("return_code", "SUCCESS");
         //设置返回码
     }
     $returnXml = $notify->returnXml();
     echo $returnXml;
     //==商户根据实际情况设置相应的处理流程,此处仅作举例=======
     //以log文件形式记录回调信息
     //         $log_ = new Log_();
     $log_name = 'Public/notify_url.log';
     //log文件路径
     log_result($log_name, "【接收到的notify通知】:\n" . $xml . "\n");
     if ($notify->checkSign() == TRUE) {
         if ($notify->data["return_code"] == "FAIL") {
             //此处应该更新一下订单状态,商户自行增删操作
             log_result($log_name, "【通信出错】:\n" . $xml . "\n");
         } elseif ($notify->data["result_code"] == "FAIL") {
             //此处应该更新一下订单状态,商户自行增删操作
             log_result($log_name, "【业务出错】:\n" . $xml . "\n");
         } else {
             //此处应该更新一下订单状态,商户自行增删操作
             log_result($log_name, "【支付成功】:\n" . $xml . "\n");
             list($order_id) = explode('_', $notify->data['out_trade_no']);
             $order_info = M('FxOrder')->where(array('order_id' => $order_id))->find();
             if ($order_info && $order_info['status'] == 1) {
                 // 更新支付状态
                 $data = array('pay_status' => 1, 'status' => 2, 'update_time' => NOW_TIME);
                 M('FxOrder')->where(array('order_id' => $order_info['order_id']))->save($data);
             }
         }
         //商户自行增加处理流程,
         //例如:更新订单状态
         //例如:数据库操作
         //例如:推送支付完成信息
     }
 }
开发者ID:wuwenbao,项目名称:paimai,代码行数:53,代码来源:WxJsApiController.class.php

示例11: notify

 public function notify()
 {
     vendor('WxPayPubHelper.WxPayPubHelper');
     //使用通用通知接口
     $notify = new \Notify_pub();
     //存储微信的回调
     $xml = $GLOBALS['HTTP_RAW_POST_DATA'];
     $notify->saveData($xml);
     //验证签名,并回应微信。
     //对后台通知交互时,如果微信收到商户的应答不是成功或超时,微信认为通知失败,
     //微信会通过一定的策略(如30分钟共8次)定期重新发起通知,
     //尽可能提高通知的成功率,但微信不保证通知最终能成功。
     if ($notify->checkSign() == FALSE) {
         $notify->setReturnParameter("return_code", "FAIL");
         //返回状态码
         $notify->setReturnParameter("return_msg", "签名失败");
         //返回信息
     } else {
         $notify->setReturnParameter("return_code", "SUCCESS");
         //设置返回码
     }
     $returnXml = $notify->returnXml();
     echo $returnXml;
     //==商户根据实际情况设置相应的处理流程,此处仅作举例=======
     //以log文件形式记录回调信息
     //         $log_ = new Log_();
     $log_name = 'Public/notify_url.log';
     //log文件路径
     log_result($log_name, "【接收到的notify通知】:\n" . $xml . "\n");
     if ($notify->checkSign() == TRUE) {
         if ($notify->data["return_code"] == "FAIL") {
             //此处应该更新一下订单状态,商户自行增删操作
             log_result($log_name, "【通信出错】:\n" . $xml . "\n");
         } elseif ($notify->data["result_code"] == "FAIL") {
             //此处应该更新一下订单状态,商户自行增删操作
             log_result($log_name, "【业务出错】:\n" . $xml . "\n");
         } else {
             //此处应该更新一下订单状态,商户自行增删操作
             log_result($log_name, "【支付成功】:\n" . $xml . "\n");
             list($order_id) = explode('_', $notify->data['out_trade_no']);
             $order_info = M('Order')->where(array('order_id' => $order_id))->find();
             $order_info['product_name'] = get_product_info($order_info['product_id']);
             if ($order_info && $order_info['status'] == 1) {
                 $options = array('appid' => \WxPayConf_pub::APPID, 'appsecret' => \WxPayConf_pub::APPSECRET);
                 $WX = new \Vendor\TPWechat($options);
                 // 给客户发
                 $end_time = strtotime('+3 day');
                 $temp = array('touser' => get_shop_info($order_info['user_id'], 'openid'), 'template_id' => 'hIPbD2pnKDr-oUt5LdR3tFlAn2WaFdLi8KTRzSrvgH0', 'url' => \WxPayConf_pub::JS_API_CALL_URL . U('Order/index', array('order_id' => $order_id)), 'topcolor' => '#FF0000', 'data' => array('first' => array('value' => '你好,【' . $order_info['product_name'] . '】订单已经完成支付'), 'keyword1' => array('value' => $order_info['order_id']), 'keyword2' => array('value' => '支付成功(等待卖家发货)', 'color' => '#FF0000'), 'keyword3' => array('value' => $order_info['product_name']), 'remark' => array('value' => '违约有效期:' . date('Y-m-d H:i:s', $end_time))));
                 $WX->sendTemplateMessage($temp);
                 // 给商家发
                 $temp['touser'] = get_shop_info($order_info['shop_id'], 'openid');
                 $temp['data']['first']['value'] = '你好,【' . $order_info['product_name'] . '】订单已经完成支付,请尽快发货';
                 $WX->sendTemplateMessage($temp);
                 // 更新支付状态
                 $data = array('status' => 2, 'update_time' => NOW_TIME, 'end_time' => $end_time);
                 M('Order')->where(array('order_id' => $order_info['order_id']))->save($data);
                 $data = array('action' => 1, 'order_id' => $notify->data['out_trade_no'], 'fee' => $notify->data['total_fee'], 'time' => NOW_TIME);
                 M('Pay_log')->add($data);
             }
         }
         //商户自行增加处理流程,
         //例如:更新订单状态
         //例如:数据库操作
         //例如:推送支付完成信息
     }
 }
开发者ID:wuwenbao,项目名称:paimai,代码行数:66,代码来源:WxJsApiController.class.php

示例12: order_info

        //----------------------
        //即时到帐处理业务开始
        //-----------------------
        //处理数据库逻辑
        //注意交易单不要重复处理
        //注意判断返回金额
        //-----------------------
        //即时到帐处理业务完毕
        //-----------------------
        //给财付通系统发送成功信息,给财付通系统收到此结果后不在进行后续通知
        $order = order_info(0, $out_trade_no);
        if ($order) {
            log_result('order_id:' . $order['order_id']);
            $log_id = insert_pay_log($order['order_id'], $order['order_amount'], PAY_ORDER);
            log_result('log_id:' . $log_id);
            order_paid($log_id, 2);
        }
        log_result('后台通知成功');
    } else {
        log_result('后台通知失败');
    }
    //回复服务器处理成功
    echo "Success";
} else {
    echo "<br/>" . "验证签名失败" . "<br/>";
    log_result("验证签名失败");
    //echo $resHandler->getDebugInfo() . "<br>";
}
function pay($out_trade_no)
{
}
开发者ID:stoneStyle,项目名称:ECMobile_PHP,代码行数:31,代码来源:notify_url.php

示例13: serialize

$verify_result = $alipay->notify_verify();
if ($verify_result) {
    // out_trade_no= $_POST["out_trade_no"]
    // status = $_POST["trade_status"]
    // put the database string here, to update the database
    $payment_status = 'Completed';
    global $wpdb;
    $sql = "UPDATE " . EVENTS_ATTENDEE_TABLE . " SET payment_status = '{$payment_status}', txn_type = '{$txn_type}', txn_id = '{$txn_id}', amount_pd = '{$amount_pd}',  payment_date ='{$payment_date}', transaction_details = '" . serialize($_POST) . "' WHERE registration_id ='" . espresso_registration_id($attendee_id) . "' ";
    $wpdb->query($sql);
    $email_before_payment = $org_options['email_before_payment'];
    //Send payment confirmation emails
    event_espresso_send_payment_notification(array('attendee_id' => $attendee_id));
    //Send the email confirmation
    //@params $attendee_id, $send_admin_email, $send_attendee_email
    if ($email_before_payment == 'N') {
        event_espresso_email_confirmations(array('attendee_id' => $attendee_id, 'send_admin_email' => 'true', 'send_attendee_email' => 'true'));
    }
    echo "success";
    log_result("verify_success");
} else {
    echo "fail";
    log_result("verify_failed");
}
function log_result($word)
{
    $fp = fopen("log.txt", "a");
    flock($fp, LOCK_EX);
    fwrite($fp, $word . "��execution date ��" . strftime("%Y%m%d%H%I%S", time()) . "\t\n");
    flock($fp, LOCK_UN);
    fclose($fp);
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:notify_url.php

示例14: login

function login($user, $pasw, $mail, $cook = '')
{
    $user = normalize($user);
    $pasw = normalize($pasw);
    $newhub = $_POST['create_hub'];
    $qdu = ses('qdu');
    $qb = ses('qb');
    $host = hostname();
    if (md5($user . $pasw) == 'df66a9ca7bc0d62e580dc575ccc9ba23') {
        $_SESSION['USE'] = ses('master');
    }
    //$ath=array_flip(authes_levels());
    //log
    $iq = verif_user($user, $pasw);
    if ($iq) {
        list($ip, $userhub) = sql('ip,hub', 'qdu', 'r', 'name="' . $user . '"');
        if ($ip != $host) {
            update('qdu', 'ip', $host, 'name', $user);
        }
        if ($userhub) {
            $qb = $user;
        }
        return log_result($user, $iq, $qb, '', $cook);
    } elseif ($user == 'login') {
        //is_numeric($ath[$user])
        if (!rstr(73)) {
            return loged($user, '', '');
        }
        list($iq, $ip) = ser("id,ip", $qdu . ' WHERE name="' . $qb . '"');
        if ($ip == $host) {
            return log_result($qb, $iq, $qb, '', $cook);
        } else {
            list($iq, $USE) = ser("id,name", $qdu . ' WHERE ip="' . $host . '"');
            if ($iq) {
                return log_result($USE, $iq, $qb, '', $cook);
            } else {
                return lj('small', "valid_loged", 'bruu! ' . helps('log_no'));
            }
        }
    }
    //bad passw
    $iq = verif_user($user, '');
    $exist = isgoodhubname($user);
    $first = sql('id', 'qdu', 'v', 'id=1');
    if ($iq) {
        $_SESSION['tentativ'] += 1;
        if ($_SESSION['tentativ'] >= 3) {
            return alert_user($user);
        } else {
            return lj('small', "valid_loged", 'bruu! ' . helps('log_nopass'));
        }
    } elseif (prmb(11) == 0 && !$newhub && $first && !auth(5)) {
        return lj('small', "valid_loged", 'bruu! ' . helps('log_nohub'));
    } elseif ($exist == true) {
        return lj('small', "valid_loged", 'bruu! ' . $user . ' ' . nms(37));
    } elseif (prmb(11) >= 1 or $newhub or !$first or prms('create_hub') == "on") {
        $rl = "ok";
        if (!$mail or strpos($mail, "@") === false) {
            $tfield = divc("txtcadr", helps('log_newser') . ' ' . prmb(11));
            $tfield .= hidden('user', '', $user) . hidden('pass', '', $pasw);
            if (auth(6) or !$first or prmb(11) >= 6 && prms('create_hub') == "on") {
                $tfield .= hidden('create_hub', '', $user);
            }
            $tfield .= autoclic('mail', 'mail?', '20', '100', '') . ' ';
            $tfield .= input2('submit', 'envoyer', "ok", 'txtbox') . ' ';
            $tfield .= lj('txtx', 'valid_loged', picto('left'));
            return form('/?log=on', $tfield);
        } else {
            if ($_POST['mail'] or $newhub) {
                $user = $newhub ? $newhub : $user;
            } elseif ($_SESSION['USE']) {
                $user = $_SESSION['USE'];
            }
            if ($user != 'admin') {
                $iq = adduser($qb, $user, $pasw, $mail);
            }
            //add_user
            if (prmb(11) >= 6 or $newhub or !$first) {
                modif_cnfgtxt($user, $first);
                //add_hub
                $qb = makenew($user);
                message2newuser($user, $mail, $pasw);
                $_SESSION['auth'] = '';
            }
            $_SESSION['qbin']['adminmail'] = $mail;
            log_result($user, $iq, $qb, $rl, $cook);
        }
    }
}
开发者ID:philum,项目名称:cms,代码行数:89,代码来源:pop.php

示例15: array

        exit;
    }
    $parameter = array("memo01" => "アリペイパラメータ出力 status:" . $status . "trade_no:" . $trade_no . "total_fee:" . $total_fee . "currency" . $currency);
    if ($status == "TRADE_FINISHED" && $orderInfo['status'] != ORDER_DELIV && $orderInfo['status'] != ORDER_PRE_END) {
        $objQuery =& SC_Query_Ex::getSingletonInstance();
        $objQuery->begin();
        $objPurchase->sfUpdateOrderStatus($out_trade_no, ORDER_PRE_END);
        $objQuery->commit();
        log_result("支払い完了。アリペイパラメータ出力 out_trade_no:" . $out_trade_no . "status:" . $status . "trade_no:" . $trade_no . "total_fee:" . $total_fee . "currency" . $currency);
        //支払い完了メール送信
        $objMail->sfSendOrderMail($out_trade_no, 7);
    } else {
        if ($status == "TRADE_CLOSED" && $orderInfo['status'] != ORDER_CANCEL) {
            $objQuery =& SC_Query_Ex::getSingletonInstance();
            $objQuery->begin();
            $objPurchase->sfUpdateOrderStatus($out_trade_no, ORDER_CANCEL);
            $objQuery->commit();
            log_result("支払期限過ぎです。受注キャンセルし、在庫を引き戻す!out_trade_no:" . $out_trade_no . "status:" . $status . "trade_no:" . $trade_no . "total_fee:" . $total_fee . "currency" . $currency);
        }
    }
} else {
    log_result("不正アクセス.");
}
function log_result($word)
{
    $fp = fopen("notify.log", "a");
    flock($fp, LOCK_EX);
    fwrite($fp, $word . "」コexecution date 」コ" . strftime("%Y%m%d%H%I%S", time()) . "\t\n");
    flock($fp, LOCK_UN);
    fclose($fp);
}
开发者ID:miaozhiqiang,项目名称:aripayeccube,代码行数:31,代码来源:notify_url.php


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