authorize.net paypal API 中是否提供 Paypal 语言选项?

Are Paypal language options available in authorize.net paypal API?

我们有一些客户需要它,以便他们的访问者可以在默认情况下使用西班牙语的 Paypal 登录页面开始。 Paypal Express 允许将参数传递到 setExpressCheckout URL,以设置默认区域设置和语言。

是否有可使用 authorize.net Paypal 函数设置的等效 Paypal LC 或 LOCALECODE 参数,或可传递到 Paypal 安全重定向 URI 的查询字符串后缀,以便可以声明启动快速结账时,Paypal 登录屏幕显示什么语言?

摘自此页面:https://developer.paypal.com/docs/classic/api/locale_codes/#localize-the-buyers-checkout-experience

Locale Codes

You can use any PayPal-supported language and locale to localize PayPal checkout pages.

Localize the buyer's checkout experience Pass a locale code to PayPal to customize the locale of the buyer's checkout experience.

PayPal payment buttons Merchants who use a PayPal payment button (PayPal Payments Standard) can set the locale code using the lc variable. To learn more about PayPal payment button HTML variables, see HTML variables for displaying PayPal checkout pages.

Express Checkout Merchants who use the Express Checkout SetExpressCheckout ( NVP, SOAP ) or Callback ( NVP ) API operations can set the locale code using the LocaleCode parameter.

For an example, see changing the locale in the Express Checkout integration guide.

然后单击集成指南link:https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECCustomizing/#change-the-locale

Change the locale

You can change the locale of PayPal pages to match the language on your website using either a 2-character country code or a 5-character locale code from the supported codes listed on the NVP/SOAP API locale codes page. To change the language displayed on the PayPal pages, set the LOCALECODE parameter to one of the allowable values in the SetExpressCheckout call.

由于 authorize.net 使用 Express Checkout API,此选项是否可用?

是的,您可以将其作为参数传递,然后传递给 Paypal。该字段称为 paypalLc,嵌套在 createTransactionRequest -> transactionRequest -> payment -> payPal -> paypalLc.[=19 下=]

来自the manual

payPalLc

Locale of pages displayed by PayPal during Express Checkout.

Defaults to US.

String.

One of:

  • AU -- Australia
  • CAN -- Canada
  • DE -- Germany
  • ES -- Spain
  • FR -- France
  • GB -- United Kingdom
  • IT -- Italy
  • US -- United States

这是一个示例 JSON 请求:

{
    "createTransactionRequest": {
        "merchantAuthentication": {
            "name": "",
            "transactionKey": ""
        },
        "transactionRequest": {
            "transactionType": "authCaptureTransaction",
            "amount": "1.00",
            "payment": {
                "payPal": {
                    "successUrl": "https://my.server.com/success.html",
                    "cancelUrl": "https://my.server.com/cancel.html",
                    "paypalLc": "ES",
                    "paypalHdrImg": "",
                    "paypalPayflowcolor": "FFFF00"
                }
            },
            "lineItems": {
                "lineItem": {
                    "itemId": "item1",
                    "name": "golf balls",
                    "quantity": "1",
                    "unitPrice": "1.00"
                }
            }
        }
    }
}