我正在设置一个贝宝(Paypal)定期帐户,以便每月接收付款。
当用户填写其详细信息(如帐单/送货地址)并选择带有价格,item_number和item_name的产品时,它将转到paypal沙箱帐户,并在成功付款后返回我的paypal_succcess.php
页面,其中在item_number / custom变量的帮助下,我更新了用户在数据库中的Transaction_id和付款状态。
我担心下个月会发生什么?我将收到什么变量以及如何更新其状态?
<!-- success_paypal.php page code -->
echo $txn_id = $_GET['tx'];
//echo $item_id = $_GET['item_number'];
echo $item_id = $_GET['cm'];
echo $currency = $_GET['cc'];
$status = $_GET['st'];
if($status=='Completed'){
echo $status="confirmed";
}
echo $amount = $_GET['amt'];
echo $item_name = $_GET['item_name'];
<!-- confirm_checkout.php page -->
<form action="https://www.sandbox.paypal.com/cgi-bin/webscr"
method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="Y6YA89BEVF9NJ">
<input type="hidden" name="custom" value="<?php echo $query_data1['id'];
?>">
<input type="hidden" name="os0" value="<?php echo
$query_data1['package']; ?>">
<table>
<tr><td><input type="hidden" name="on0" value=""></td></tr>
</table>
<input type="hidden" name="currency_code" value="USD">
<input type="image"
src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynow_SM.gif"
border="0" name="submit" alt="PayPal - The safer, easier way to pay
online!">
<img alt="" border="0"
src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
</form>