Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send Shipping address to Paypal, when using Paypal IPN

I am trying to integrate Paypal IPN to an application which I am developing. And I am stuck in a problem which is regarding shipping address. I need to know how to send the address variables to Paypal, as a request so that User can see that address on paypal. Please tell me the variables which should be sent to paypal, which paypal treats as shipping address(or delivery address).

Thanks in advance.

like image 681
Nishant Shrivastava Avatar asked Apr 20 '11 16:04

Nishant Shrivastava


People also ask

How do I use PayPal with IPN?

Click the settings icon at the top of your PayPal account page and then click Account Settings. On the Notifications page, click the Update link for the Instant payment notifications item. Click Choose IPN Settings to specify your listener's URL and activate the listener.

Does PayPal address have to match shipping address?

While Paypal orders can be shipped to an address that is different from the billing address, the address you'd like to use must already be saved in your Paypal account before purchase. Paypal cannot be used for the following types of orders: Subscription orders.

What does preparing PayPal IPN mean?

Instant Payment Notification (IPN) is a message service that notifies you of events related to PayPal transactions. You can use IPN messages to automate back-office and administrative functions, such as fulfilling orders, tracking customers, or providing status and other transaction-related information.


1 Answers

To send the shipping address to PayPal you need to modify your PayPal submit form.

Using this will let you to override PayPal stored address:

<input type="hidden" name="address_override" value="1">

And then use this variables to override PayPal stored address:

<input type="hidden" name="first_name" value="Spendthrift">
<input type="hidden" name="last_name" value="Richer">
<input type="hidden" name="address1" value="123 Money St">
<input type="hidden" name="city" value="Dollarwood">
<input type="hidden" name="state" value="AB">
<input type="hidden" name="zip" value="4811">
<input type="hidden" name="country" value="CA">

From PayPal.com

The payer is shown the passed-in address but cannot edit it. No address is shown if the address is invalid, such as missing required fields like country, or if the address is not included at all.

Here are the references:
https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/#id08A6F0T0JQN

like image 146
Cliff Burton Avatar answered Oct 17 '22 15:10

Cliff Burton