PayPal IPN和买家地址

时间:2011-11-11 16:07:50

标签: paypal paypal-ipn paypal-sandbox

不知怎的,我无法从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] => 
)

我错过了什么吗?

1 个答案:

答案 0 :(得分:3)

是的,您设置了<input type="hidden" name="no_shipping" value="1">。这意味着您将无法收到送货地址。 确保您设置<input type="hidden" name="no_shipping" value="2">