I am using Paypal IPN to process orders on an ecommerce site. One issue I'm having is figuring out how to send address information to PayPal for the address_override
function.
For a U.S. address it's easy. You just do something like this:
first_name = first
last_name = last
address1 = 1 main st
address2 = APT 304
city = Cityname
zip = 01234
state = NY
country = US
But for a Canadian address, for example, the state field cannot be entered and I cannot find a "Province" field to replace it.
What do I do in this situation? What about all the other countries? The documentation list all the countries and country codes that they accept. But I see nothing on how to actually send these.
Alright, apparently the PayPal documentation is wrong. The description given for the state
variable is:
U.S. state
For allowable values; use the Official U.S. Postal Service Abbreviations.
This is incorrect. The state variable can be the abbreviation of the selected country's equivalent of a state. So if shipping to an address in Ontario you need to put ON
in the state field.