<?php
define('DIRCMS_ROOT', str_replace("\\", '/', substr(dirname(__FILE__), 0, -3)));

require DIRCMS_ROOT.'include/common.inc.php';
include DIRCMS_ROOT.'member/include/global.func.php';
$pay_code = 'alipay';

$plugin_file = DIRCMS_ROOT.'api/'.$pay_code.'.php';
if (is_file($plugin_file))
{
	include_once( $plugin_file );
	$payment = new $pay_code();
	$result = $payment->respond();
	if ($result)
	{
		exit("success");
	}
	else if($payment->err)
	{
		exit("fail");
	}
	else
	{
		exit("fail");
	}
}
else
{
	exit("fail");
}
?>