Paypal shipping address errors
The address_override
parameter is there to set the shipping address your Magento shop is sending to Paypal as shipping address instead of the customer's shipping address saved at Paypal's side.
If address_override
is set to 1
, which is the case in Magento, then Paypal will validate the shipping address. If the parameter is set to 0
, it supposedly doesn't. So make sure you're sending a valid and well-formatted address to Paypal.
I ran into this problem because of a missing "state" value. Paypal only accepts state abbreviations like "CA" for "California". For other countries, states might not be available in your Magento installation by default, e.g. for Mexico.
Did you customize any shipping address fields in your checkout?
You can do the following if you don't want to change core files:
- Create folders
Mage/Paypal/Model/Api
under/app/code/local/
- Copy the file
Standard.php
from/app/code/core/Mage/Paypal/Model/Api
- Paste the file
Standard.php
to/app/code/local/Mage/Paypal/Model/Api
- Change the line 238 from
$request['address_override'] = 1;
to
$request['address_override'] = 0;
Check out these Stack Overflow answers:
https://stackoverflow.com/questions/5978153
https://stackoverflow.com/questions/11281543
Basically, a quick and dirty way is to copy the entire file to your app/code/local/Mage
world, but would be even better for upgrades if you could overload just the one lone function.
Also, if not already, please use Github for version control. It has saved me more than once! You can track all changes easily, even if you are being bad and editing core files.