Server : Apache System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/saimikebio.com/mobile/notify/ |
<?php /** * 手机银联支付异步响应操作 by Bragg */ define('IN_ECTOUCH', true); require(dirname(__FILE__) . '/../include/init.php'); require(ROOT_PATH . 'include/lib_payment.php'); require(ROOT_PATH . 'include/lib_order.php'); /* 支付方式代码 */ $pay_code = 'upop_wap'; /* 支付信息 */ $payment = get_payment($pay_code); // 获取异步数据 $async_data = $_POST; if(!empty($async_data)){ $plugin_file = ROOT_PATH . 'include/modules/payment/' . $pay_code . '.php'; /* 检查插件文件是否存在,如果存在则验证支付是否成功,否则则返回失败信息 */ if (file_exists($plugin_file)) { /* 根据支付方式代码创建支付类的对象并调用其响应操作方法 */ include_once($plugin_file); if (upop_wap::verifySignature($async_data, $payment['upop_wap_security_key'])){ // 服务器签名验证成功 if ($async_data['transStatus'] == "00"){ // 交易处理成功 //获取log_id $out_trade_no = explode('O', $async_data['orderNumber']); $order_sn = $out_trade_no[1];//订单号log_id // 改变订单状态 order_paid($order_sn, 2); } echo "success"; }else {// 服务器签名验证失败 echo "fail"; } } else { exit("fail"); } }else{ echo "fail"; } //打印日志 function logResult($word='') { $fp = fopen("log.txt","a"); flock($fp, LOCK_EX) ; fwrite($fp,"执行日期:".strftime("%Y%m%d%H%M%S",time())."\n".$word."\n"); flock($fp, LOCK_UN); fclose($fp); } ?>