我尝试将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:
<input name="lc" type="hidden" value="CZ">
Run Code Online (Sandbox Code Playgroud)
我在CZ中得到了两种语言,在CZ中得到了用户所在国家/地区的预填充:
您知道一种方法: