<?php
|
define('IN_ECS', true);
|
require(dirname(__FILE__) . '/includes/init.php');
|
require(ROOT_PATH . 'includes/lib_payment.php');
|
|
//获取通知的数据
|
$xml = $GLOBALS['HTTP_RAW_POST_DATA'];
|
if (empty($xml)){
|
$xml = file_get_contents('php://input');
|
}
|
|
if (!empty($xml)){
|
$plugin_file = 'includes/modules/payment/wxpay_h5.php';
|
/* 检查插件文件是否存在,如果存在则验证支付是否成功,否则则返回失败信息 */
|
if (file_exists($plugin_file))
|
{
|
/* 根据支付方式代码创建支付类的对象并调用其响应操作方法 */
|
include_once($plugin_file);
|
$payment = new wxpay_h5();
|
$payment->respond();
|
echo 'success';
|
exit;
|
}
|
}
|
?>
|