问题描述:

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?

网友答案:

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.

相关阅读:
Top