我目前實現了PayPal進入物品訂閱的表單,下面的代碼運行良好,直接進入PayPal網頁並處理交易。PayPal獲得成功後返回參數
如何在交易成功後返回某些參數?我試過回顯$_REQUEST['custom']
,$_REQUEST['email']
,$_REQUEST['a3']
和$_REQUEST['p3']
重定向從貝寶回到返回的網址,但只有$_REQUEST['custom']
顯示,我怎麼能得到這些params進一步進程?
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick-subscriptions">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="email" value="<?php echo $BuyerEmail ?>">
<input type="hidden" name="item_name" value="<?php echo $ProdDesc ?>">
<input type="hidden" name="item_number" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="return" value="http://sitename.com/return.php?msg=Transaction+Complete">
<input type="hidden" name="cancel_return" value="http://sitename.com/return.php?msg=Transaction+Canceled">
<input type="hidden" name="notify_url" value="http://sitename.com/notify.php">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="<?php echo $Currency ?>">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="custom" value="<?php echo $RefNo ?>">
<input type="hidden" name="a3" value="<?php echo $Amount ?>">
<input type="hidden" name="p3" value="<?php echo $Duration ?>">
<input type="hidden" name="t3" value="M">
<input type="hidden" name="src" value="1">
<input type="hidden" name="sra" value="1">
<input type="submit" name="Submit" value="Pay now">
</form>