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/xunhupay/notify3.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();
require_once get_template_directory() . '/inc/class/xunhupay.class.php';

//未启用接口时禁止访问跳回首页
if (!_cao('is_xunhupay_wx')) {
    wp_safe_redirect(home_url());exit;
}


// 获取后台支付配置
$XHpayConfig = _cao('xunhupay_wx');
$data        = (array) json_decode(file_get_contents('php://input'));
if (!$data) {
    exit('faild!');
}
$private_key  = $XHpayConfig['private_key'];
$out_trade_no = isset($data['out_trade_no']) ? $data['out_trade_no'] : null;
$order_id     = isset($data['order_id']) ? $data['order_id'] : null;
$hash         = XH_Payment_Api::generate_xh_hash_new($data, $private_key);
if ($data['sign'] != $hash) {
    //签名验证失败
    echo 'failed';exit;
}
if ($data['status'] == 'complete') {
    $RiProPay = new RiProPay;
    $RiProPay->send_order_trade_success($out_trade_no, $order_id, 'ripropaysucc');
    print 'success';exit();
} else {
    //处理未支付的情况
}
//以下是处理成功后输出,当支付平台接收到此消息后,将不再重复回调当前接口
print 'success';
exit;