PayPal IPN 和买家地址

发布于 2024-12-15 07:13:09 字数 2340 浏览 3 评论 0原文

不知何故,我无法从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谁人与我共长歌 2024-12-22 07:13:09

是的,您设置。这意味着您将无法取回送货地址。
确保设置

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文