一、HTML
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" name="frm_paypal">
<input type="hidden" name="return" value="http://wyg517.gicp.net//mvtest/paysuccess.php"/><!--您的客户完成付款后将返回的互联网 URL-->
<input type="hidden" name="notify_url" value="http://wyg517.gicp.net/mvtest/paysuccess.php"/><!--仅与 IPN 一起使用。发送 IPN Form Post 的互联网 URL-->
<input type="hidden" name="cancel_return" value="http://wyg517.gicp.net/mvtest/payfailed.php"/><!--您的客户取消付款后将返回的互联网 URL-->
<input type="image" src="http://www.paypal.com/zh_XC/i/btn/x-click-but01.gif" name="submit" alt="请使用PayPal付款 —— 快捷、免费和安全的付款方式!">
二、paysuccess.php
<?php
//$res = 'succeess'.date("Y-m-d H:i:s").print_r($_REQUEST, true);
//file_put_contents("paypalsuccess.txt", $res);
//echo $_POST['item_name'];
print_r($_POST);
//echo $_POST['item_name'];
?>
三、payfailed.php
<?php
$res = 'failed'.date("Y-m-d H:i:s").print_r($_REQUEST, true);
file_put_contents("paypalfailed.txt", $res);
?>
文章评论