PayPal IPN 和买家地址
不知何故,我无法从 IPN 响应中获取买家地址。
以下是请求表:
<form id="form1" name='frmPayPal' method="post" action="<?php echo $url; ?>">
<input type='hidden' name='business' value='<?php echo $ppAcc; ?>'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='item_name' value='<?php echo $desc; ?>'>
<input type='hidden' name='item_number' value='<?php echo $orderno; ?>'>
<input type='hidden' name='amount' value='<?php echo $net = $price + $shipping; ?>' id='nettotal'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='handling' value='0'>
<input type='hidden' name='cancel_return' value='<?php echo $cancelURL; ?>'>
<input type='hidden' name='return' value='<?php echo $returnURL; ?>'>
以及 PayPal IPN 的回复:
Array ( [0] => SUCCESS [1] => transaction_subject=Bookretary+-+Personal+Finance+Organizer [2] => payment_date=08%3A00%3A49+Nov+11%2C+2011+PST [3] => txn_type=web_accept [4] => last_name=User [5] => residence_country=US [6] => item_name=Bookretary+-+Personal+Finance+Organizer [7] => payment_gross=39.99 [8] => mc_currency=USD [9] => business=seller_1320083112_biz%40interactmarketing.com [10] => payment_type=instant [11] => protection_eligibility=Ineligible [12] => payer_status=verified [13] => tax=0.00 [14] => payer_email=buyer_1320083080_per%40interactmarketing.com [15] => txn_id=7FS07838VX3650032 [16] => quantity=1 [17] => receiver_email=seller_1320083112_biz%40interactmarketing.com [18] => first_name=Test [19] => payer_id=FHC9HUXME54VQ [20] => receiver_id=WKJGSA3LXEPN6 [21] => item_number=10001 [22] => handling_amount=0.00 [23] => payment_status=Completed [24] => payment_fee=1.46 [25] => mc_fee=1.46 [26] => shipping=0.00 [27] => mc_gross=39.99 [28] => custom= [29] => charset=windows-1252 [30] => )
我错过了什么吗?
Somehow I can't get buyer address from the IPN response.
Here is request form:
<form id="form1" name='frmPayPal' method="post" action="<?php echo $url; ?>">
<input type='hidden' name='business' value='<?php echo $ppAcc; ?>'>
<input type='hidden' name='cmd' value='_xclick'>
<input type='hidden' name='item_name' value='<?php echo $desc; ?>'>
<input type='hidden' name='item_number' value='<?php echo $orderno; ?>'>
<input type='hidden' name='amount' value='<?php echo $net = $price + $shipping; ?>' id='nettotal'>
<input type='hidden' name='no_shipping' value='1'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='handling' value='0'>
<input type='hidden' name='cancel_return' value='<?php echo $cancelURL; ?>'>
<input type='hidden' name='return' value='<?php echo $returnURL; ?>'>
And response from PayPal IPN:
Array ( [0] => SUCCESS [1] => transaction_subject=Bookretary+-+Personal+Finance+Organizer [2] => payment_date=08%3A00%3A49+Nov+11%2C+2011+PST [3] => txn_type=web_accept [4] => last_name=User [5] => residence_country=US [6] => item_name=Bookretary+-+Personal+Finance+Organizer [7] => payment_gross=39.99 [8] => mc_currency=USD [9] => business=seller_1320083112_biz%40interactmarketing.com [10] => payment_type=instant [11] => protection_eligibility=Ineligible [12] => payer_status=verified [13] => tax=0.00 [14] => payer_email=buyer_1320083080_per%40interactmarketing.com [15] => txn_id=7FS07838VX3650032 [16] => quantity=1 [17] => receiver_email=seller_1320083112_biz%40interactmarketing.com [18] => first_name=Test [19] => payer_id=FHC9HUXME54VQ [20] => receiver_id=WKJGSA3LXEPN6 [21] => item_number=10001 [22] => handling_amount=0.00 [23] => payment_status=Completed [24] => payment_fee=1.46 [25] => mc_fee=1.46 [26] => shipping=0.00 [27] => mc_gross=39.99 [28] => custom= [29] => charset=windows-1252 [30] => )
Do I have missed something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您设置
。这意味着您将无法取回送货地址。
确保设置
。
Yes, you set
<input type="hidden" name="no_shipping" value="1">
. That means you won't get a shipping address back.Ensure you set
<input type="hidden" name="no_shipping" value="2">
instead.