Paypal发送国家/地区(使用不同的值lc和国家/地区字段)

Sam*_*zon 8 php paypal

我尝试将Paypal按钮付款集成到我的网站上。该网站接受来自许多国家的用户。该网站的语言为英语。我的用户在我的网站上定义了收货地址,我将其与表格一起提供给Paypal。但是,当我发送另一个没有更改lc参数的国家/地区时,Paypal不会用新的国家/地区预先填充。

我的问题是与此相对的:贝宝托管语言错误。Paypal Express按钮基于“国家”而不是“ lc”

示例(我的表格):

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

    <input type="hidden" name="amount" value="5">
    <input name="currency_code" type="hidden" value="GBP">
    <input name="shipping" type="hidden" value="0.00">
    <input name="tax" type="hidden" value="0.00">
    <input name="return" type="hidden" value="https://my-shop.com">
    <input name="cancel_return" type="hidden" value="https://my-shop.com">
    <input name="notify_url" type="hidden" value="https://my-shop.com">
    <input name="cmd" type="hidden" value="_xclick">
    <input name="business" type="hidden" value="sales@my-shop.com">
    <input name="no_shipping" type="hidden" value="1">
    <input name="item_name" type="hidden" value="1234">
    <input name="no_note" type="hidden" value="1">
    <input name="bn" type="hidden" value="xxxx">
    <input name="custom" type="hidden" value="the_buyer@gmail.com">
    <input name="invoice" type="hidden" value="1223">

    <input name="address_override" type="hidden" value="1">
    <input name="address1" type="hidden" value="Frani Sramka 20">
    <input name="address2" type="hidden" value="">
    <input name="city" type="hidden" value="Prague 5">
    <input name="zip" type="hidden" value="15000">
    <input name="country" type="hidden" value="CZ">

    <!-- Countries part -->
    <input name="lc" type="hidden" value="GB">

    <input name="address_country" type="hidden" value="CZECH REPUBLIC">
    <input name="address_country_code" type="hidden" value="CZ">
    <input name="residence_country" type="hidden" value="CZ">


    <button type="submit" class="btn btn-primary">Pay by PayPal</button>
</form>
Run Code Online (Sandbox Code Playgroud)

在这种情况下,贝宝将页面语言设置为GB(由lc字段提供),但是贝宝的“国家/地区”字段已预先填充了英国,请参见屏幕截图:

在此处输入图片说明

但我希望Paypal将我的国家/地区字段(值CZ)考虑在内。


将lc字段设置为CZ行为

如果我将lc字段设置为CZ:

<input name="lc" type="hidden" value="CZ">
Run Code Online (Sandbox Code Playgroud)

我在CZ中得到了两种语言,在CZ中得到用户所在国家/地区的预填充:

在此处输入图片说明


简短问题:

您知道一种方法:

  • 预填用户国家(CZ)
  • 保留所选语言(GB)

附加信息

  • 除此语言问题外,该表格有效
  • 我使用自定义的PHP后端技术(而不是带有插件的CMS)

贝宝文档

预先填写我客户的PayPal注册表格,其中包含国家和地区描述

国家代码

小智 0

我看到中国是“c2”而不是“cz”?我错了吗?

在此输入图像描述