Paypal Hosted language bug. Based on 'country' instead of 'lc' for Paypal Express button

那年仲夏 提交于 2019-12-11 07:34:28

问题


  1. Create a paypal hosted form using the templateD option with lc="GB" but shipping country of another language than English (like NL)
  2. When given the option to pay with Paypal Express or credit card, choose the Paypal express option.
  3. When redirected to paypal, the paypal login form is shown in dutch because it is using the "country" value instead of the "lc" value. I've confirmed this by forcing "GB" in the country value.

Here's the html form:

<form action="https://securepayments.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess" method="post" id="checkout-form">
    <input type="hidden" name="cmd" value="_hosted-payment">
    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="shipping" value="4.13">
    <input type="hidden" name="tax" value="0.83">
    <input type="hidden" name="subtotal" value="22.98">
    <input type="hidden" name="business" value="xxx@xxx.com">
    <input type="hidden" name="currency_code" value="GBP">
    <input type="hidden" name="showShippingAddress" value="true">
    <input type="hidden" name="first_name" value="test">
    <input type="hidden" name="last_name" value="test">
    <input type="hidden" name="address1" value="123 Test">
    <input type="hidden" name="address2" value="">
    <input type="hidden" name="city" value="Laren">
    <input type="hidden" name="zip" value="1251TM">
    <input type="hidden" name="country" value="NL">
    <input type="hidden" name="state" value="Noord Holland">
    <input type="hidden" name="night_phone_b" value="252525">
    <input type="hidden" name="billing_first_name" value="test">
    <input type="hidden" name="billing_last_name" value="test">
    <input type="hidden" name="billing_address1" value="123 UK Street, Suite UK1">
    <input type="hidden" name="billing_address2" value="">
    <input type="hidden" name="billing_city" value="Aberdeen">
    <input type="hidden" name="billing_zip" value="AB10">
    <input type="hidden" name="billing_country" value="GB">
    <input type="hidden" name="logoImage" value="https://www.specialistsupplements.com/image/data/specialist-supplements-logo.png">
    <input type="hidden" name="billing_state" value="Aberdeen">
    <input type="hidden" name="showBillingPhone" value="false">
    <input type="hidden" name="showHostedThankyouPage" value="false">
    <input type="hidden" name="buyer_email" value="test@test.com">
    <input type="hidden" name="invoice" value="123">
    <input type="hidden" name="lc" value="GB">
    <input type="hidden" name="charset" value="utf-8">
    <input type="hidden" name="address_override" value="false">
    <input type="hidden" name="paymentaction" value="sale">
    <input type="hidden" name="return" value="xxxx">
    <input type="hidden" name="notify_url" value="xxxx">
    <input type="hidden" name="cancel_return" value="xxxx">
    <input type="hidden" name="custom" value="123">
    <input type="hidden" name="template" value="templateD">
</form>

The "lc" code in this is "GB" which is what should force "English". The problem is a person who does not read dutch may want to send an item to a friend in another country and will not be able to read the payment options. At the very least it should be using the billing_country value, but ultimately use the lc code as that is its intended use.


回答1:


I found that PayPal was ignoring the lc and billing_country fields.

In my case, both were set to CA, but upon arrival at PayPal, it would always show United States for the billing country, not Canada.

The workaround I found is to set:

<input name="landing_page" value="billing" type="hidden">

After I set this variable, PayPal stopped ignoring the billing_country field.



来源:https://stackoverflow.com/questions/45089885/paypal-hosted-language-bug-based-on-country-instead-of-lc-for-paypal-expres

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!