HEX
Server: Apache
System: Linux top 5.8.11-1.el7.elrepo.x86_64 #1 SMP Tue Sep 22 18:18:35 EDT 2020 x86_64
User: www (1000)
PHP: 7.4.33
Disabled: 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
Upload Files
File: /www/wwwroot/www.018111.cn/wp-content/themes/jian/shop/alipay/return.php
<?php


/**
 * 支付宝同步回调
 */

header('Content-type:text/html; Charset=utf-8');
date_default_timezone_set('Asia/Shanghai');
ob_start();
require_once dirname(__FILE__) . "../../../../../../wp-load.php";
ob_end_clean();

if (!_cao('is_alipay')) {
    wp_safe_redirect(home_url());exit;
}


if (empty($_GET)) {
    echo '非法请求';exit();
}

// 获取后台支付宝配置
$aliPayConfig = _cao('alipay');

if (empty($aliPayConfig['md5Key'])) {
    wp_safe_redirect(home_url());exit;
}

// 公共配置
$params         = new \Yurun\PaySDK\Alipay\Params\PublicParams;
$params->md5Key = $aliPayConfig['md5Key'];

// SDK实例化,传入公共配置
$pay = new \Yurun\PaySDK\Alipay\SDK($params);

if ($pay->verifyCallback($_GET)) {
	// 验证成功 $_GET['trade_no']
	$out_trade_no = $_GET['out_trade_no'];
	$_post_id = 0;
	// 查询本地订单
	$RiProPay = new RiProPay;
    $postData = $RiProPay->get_order_info($out_trade_no);
    if ($postData) {
    	$_post_id = $postData['post_id'];
    	$RiProPay->AddPayPostCookie($postData['user_id'],$_post_id,$postData['order_trade_no']);
    }
    if ($_post_id>0) {
    	wp_safe_redirect( get_the_permalink( $_post_id ) );
    }else{
    	wp_safe_redirect(home_url('/user'));
    }
	// 验证结束

} else {
    wp_safe_redirect(home_url());
}