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/weixin/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/saimikebio.com/mobile/weixin/wxpay_activists_recall.php
<?php
/**
* 维权通知
*/
define('IN_ECTOUCH', true);

require(dirname(__FILE__) . '/../include/init.php');
require(ROOT_PATH . 'include/lib_payment.php');
require(ROOT_PATH . 'include/kernel/library/Http.class.php');
//接收数据
$postStr = $GLOBALS['HTTP_RAW_POST_DATA'];

if(!empty($postStr)){
	//强制转换为数组
	$postData = (array)simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);

	/* 支付方式代码 */
	$pay_code = 'wxpay';
	/* 支付信息 */
	$payment  = get_payment($pay_code);

	//确定为新增还是确认
	if(isset($postData['TransId']) && !empty($postData['TransId'])){
		$data = $postData;
	}
	else{
		$data = $postData;
	}

//标记客户的投诉处理状态api
	//获取access_token
	$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid='.$payment['wxpay_appid'].'&secret='.$payment['wxpay_appsecret'];
	$data = Http::doGet($url);
	$token = json_decode($data);

	//标记客户的投诉处理状态
	$url1 = 'https://api.weixin.qq.com/payfeedback/update?access_token='.$token->access_token.'&openid='.$data['OpenId'].'&feedbackid='.$data['FeedBackId'];
	$rs =  Http::doGet($url1);
	$rs_back = json_decode($rs);

	if($rs_back->errcode == 0){
		echo $rs_back->errmsg; //OK
		//logResult($rs_back->errmsg);
	}
	else{
		echo $rs_back->errcode . ':' . $rs_back->errmsg;
		//logResult($rs_back->errcode . ':' . $rs_back->errmsg);
	}
}

//打印日志
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);
}