简体   繁体   English

如何通过 HTML 表单字段在 Paypal 支付标准上正确设置国家/地区

[英]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).我希望 Paypal 在通过 Paypal 支付标准(即 HTML 表格或手动按钮)接收付款时预先选择“加拿大”作为国家/地区。

Despite setting Paypal's locale and country variables (lc and country) to 'CA' the paypal form remains set for the United States.尽管将 Paypal 的区域设置和国家/地区变量(lc 和国家/地区)设置为“CA”,但 paypal 表格仍为美国设置。 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.但前提是用户的浏览器没有任何 cookies 已经从以前的 PayPal 签出设置覆盖设置。

Test in private/incognito mode and you will see.在私人/隐身模式下测试,你会看到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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