简体   繁体   中英

How to correctly set country/region on Paypal Payments Standard through HTML form fields

I want Paypal to pre-select "Canada" as the Country/Region when receiving a payment through Paypal Payments Standard (ie an HTML form, or manual button).

Despite setting Paypal's locale and country variables (lc and country) to 'CA' the paypal form remains set for the United States. Other form values seem to populate correctly.

For example:

<FORM ACTION="http://www.paypal.com/webscr" METHOD=GET>
<input type=hidden name=cmd value="_xclick">
<input type=hidden name=custom value=1234>
<input type=hidden name=business value="baz@example.com">
<input type=hidden name=currency_code value=CAD>
<input type=hidden name=item_name value="Item Name">
<input type=hidden name=quantity value=1>
<input type=hidden name=amount value="23.00">
<input type=hidden name=address1 value="1234 A Street">
<input type=hidden name=city value=Ottawa>
<input type=hidden name=state value=ON>
<input type=hidden name=zip value="K1A0N1">
<input type=hidden name=country value=CA>
<input type=hidden name=email value="foo@example.com">
<input type=hidden name=first_name value=Jimmy>
<input type=hidden name=last_name value=Jones>
<input type=hidden name=lc value=CA>
<input type=hidden name=charset value="utf-8">
<input type=hidden name=night_phone_a value=6135551212>
<input type=hidden name=landing_page value=Billing>
<input type=hidden name=address_override value=1>
<input type=hidden name=no_note value=1>
<input type=hidden name=no_shipping value=1>
<input type=hidden name=rm value=1>
<input type=hidden name=cbt value="Return">
<input type=hidden name=return value="https://example.com/return">
<input type=hidden name=cancel value="https://example.com/cancel">
<input type=hidden name=notify_url value="https://example.com/notify">

<input type=submit>
</form>

[edited] A full locale value:

<input type=hidden name=lc value=en_CA>

Does work. But only if the user's browser doesn't have any cookies already set from previous PayPal checkouts to override the setting.

Test in private/incognito mode and you will see.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM