Even if "PayPal login page language" is set to other than "US" it always redirects to https://www.paypal.com/us/.
I tried it with several languages clearing the cookie of browsers.

Files: 
CommentFileSizeAuthor
#8 1586424-paypal-default-country-all.patch3.45 KBlongwave
PASSED: [[SimpleTest]]: [MySQL] 2,453 pass(es).
[ View ]
#7 1586424-paypal-default-country.patch574 byteslongwave
PASSED: [[SimpleTest]]: [MySQL] 2,459 pass(es).
[ View ]

Comments

Category:bug» support
Status:Active» Postponed (maintainer needs more info)

The URL you quote is not hardcoded anywhere in Ubercart, and the lc parameter is sent correctly. If you are in the US, perhaps PayPal is performing geolocation and redirecting you based on your IP address? You should try accessing your site through a proxy server located in another country to see if you are redirected differently there.

@longwave Thanks for your response. I'm actually using it in Japan. I tried all the languages listed in "PayPal login page language" but always redirected to the US version.
The exact URL looks like
https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=Ut8Z3gAK2-u6F...

By the way, Is it difficult to hard-code it instead ? I would like to see if it's paypal side thing or not if possible. Which part of the code should I modify for example to make it to just "JP" ?

I eventually paid somebody to fix this problem and he found out that paypal was taking the country of "Billing information".
As I had removed "Billing information" from the checkout pane it was always redirected to "US".

Can you provide a patch?

Sorry actually there is no patch for this. I just enable the "billing information" pane and set the country to "JP" and then unset it on checkout page just to hide it.

"Sent address selection" in "PayPal Website Payments Standard settings" we are forced to choose one of two options "Send billing address to PayPal" or "Send shipping address to PayPal" and I guess this option should be removed or something..

Version:6.x-2.9» 7.x-3.x-dev
Category:support» bug
Status:Postponed (maintainer needs more info)» Active

According to http://blog.brains4all.com/brainblog/archives/2008/04/paypal_language.html this is a limitation in PayPal, if you send a country code as part of the address then PayPal uses this in preference to the language parameter.

However, uc_paypal currently defaults to 'US' if the country is not available for any reason. It seems to make sense to alter uc_paypal to send the store default country by default, and also drop the 'lc' parameter entirely.

Status:Active» Needs review
StatusFileSize
new574 bytes
PASSED: [[SimpleTest]]: [MySQL] 2,459 pass(es).
[ View ]

This one line patch should ensure that the store default country is used when the billing pane is disabled, instead of defaulting to the US.

StatusFileSize
new3.45 KB
PASSED: [[SimpleTest]]: [MySQL] 2,453 pass(es).
[ View ]

This patch removes the PayPal language setting entirely, as it doesn't work when we send the country. Instead, it defaults the country to the store country for all PayPal operations.

but why do we need to send paypal the country? could we not let paypal deside what country to use, because paypal has a well known idee what language to set the checkout page... (as far as i know paypal knows what language to set there checkout)

I now face this problem, because i have a multilanguage website, i get orders from people all around the world but i only have a english and dutch website... but i also have "Billing information" not enabled on checkout page... so i'm looking for a way to break this code out...

For example a French user is now also shown the US page, because my website is only in English and Dutch. But should paypal not be French then?