<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PayPal Notify Url</title>
</head>
<body>
<?php
/**
 * 回调方法会接受如下参数
 *
 * invoice: 交易号，对应商户提交的交易号
 */
    $fop = fopen("paypal_log.txt","a");
//  	$url  = 'http://www.live7a.com/index.php?controller=checkout_process&action=payment_bridge';		
//	$url .= '&reference='.$_REQUEST['invoice'];
    $url='http://www.live9a.com/index.php?controller=potential_order&action=ProcessPending&reference='.$_REQUEST['invoice'];	
    fwrite($fop,$url);
    flock($fop, LOCK_UN);
    fclose($fop);
    
	//echo 'window.location.href="'.$url.'" ';
	/*echo "Payment succeed, wait 5 seconds will be redirected to your account";		
	echo "<meta http-equiv=\"refresh\" content=\"5;url=$url\">"; 
	header("Location:$url"); */
	$result=file_get_contents($url); 
		

?>

</body>
</html>
