简体   繁体   English

贝宝(Paypal)从运输国本地化

[英]Paypal localized from shipping country

I'm implementing Paypal rest API for one of my customers and I'm facing an issue. 我正在为我的一位客户实施Paypal rest API,但遇到了问题。

My merchant platform is a French Guiana based business so everything should be in French, but when customers put French Guiana in the form for country, I'm providing GF as ISO 2 Country code and the PayPal interface is in English... is there a way to force the French language? 我的商人平台是一家基于法属圭亚那的公司,因此所有内容都应该使用法语,但是当客户将法属圭亚那输入国家/地区的表单时,我将GF作为ISO 2国家/地区代码提供,并且PayPal界面是英语...一种强制法语的方法? Moreover, if I try to put FRANCE as country from a France located computer, the page is translated in french AND I can process to the payment without opening a PayPal account, which is not possible in the French Guiana case. 此外,如果我尝试通过位于法国的计算机将法国设置为国家/地区,则该页面将以法语翻译,并且无需打开贝宝帐户就可以处理付款,这在法属圭亚那情况下是不可能的。

Is there some kind of geolocalization of PayPal for language and features selection OR it's all based on the country code in the shipping address... (but regarding the tests I did, it appears that the country iso code 2 provided during the transaction is not enough to force proper PayPal interface. PayPal是否针对语言和功能选择进行了某种地理定位,还是全部基于收货地址中的国家/地区代码...(但是关于我所做的测试,交易期间提供的国家/地区代码2似乎不是足以强制使用正确的PayPal接口。

I saw this in the documentation : 我在文档中看到了这一点:

Pass a locale code to PayPal to customize the locale of the buyer's checkout experience. 将语言环境代码传递给PayPal,以自定义买家结帐体验的语言环境。

To determine the locale for the checkout page, PayPal uses the locale code and these other factors: 为了确定结帐页面的语言环境,PayPal使用语言环境代码和以下其他因素:

  • The shipping address country provided by the merchant in the request. 商家在请求中提供的送货地址国家/地区。
  • The country was taken from the locale code parameter passed by the merchant. 该国家/地区是从商家传递的区域代码参数中获取的。
  • The country of the currently logged-in user. 当前登录用户所在的国家。
  • The merchant's country. 商人的国家。
  • When this information is not available, PayPal uses these default locales in this order: 当此信息不可用时,贝宝按以下顺序使用以下默认语言环境:
    • en_US zh_CN
    • fr_XC fr_XC
    • es_XC es_XC
    • zh_XC zh_XC

In the documentation, but after a test, it seems to not be working just with the FR shippingCountryCode... ( https://developer.paypal.com/docs/integration/direct/rest/locale-codes/ ) 在文档中,但是经过测试,它似乎不能仅与FR shippingCountryCode ...( https://developer.paypal.com/docs/integration/direct/rest/locale-codes/ )一起使用。

Help 救命

If you are using /Payments API for your Checkout ( looks like you are ) 如果您使用/ Payments API进行Checkout(看起来像是)

Look at the below object - and pass the appropriate locale. 查看下面的对象-并传递适当的语言环境。 https://developer.paypal.com/docs/api/payments/#definition-application_context https://developer.paypal.com/docs/api/payments/#definition-application_context

The other bit is that the locale is also dependent on the buyer preferences - for eg you might have someone in French Guyana but who has chosen english as the language. 另外一点是,语言环境还取决于购买者的偏好-例如,您可能有一个人用法属圭亚那,但选择了英语作为语言。

use a locale of "fr-GF" this should do the trick. 使用“ fr-GF”的语言环境,这应该可以解决问题。

if for some reason you are using an SDK that doesn't yet support application_context than you will have to recourse to using the Payments Experience API - https://developer.paypal.com/docs/api/payment-experience/ look at https://developer.paypal.com/docs/api/payment-experience/#definition-presentation for a similar capability . 如果由于某种原因您使用的SDK不支持application_context,那么您将不得不使用Payments Experience API- https://developer.paypal.com/docs/api/payment-experience/查看https ://developer.paypal.com/docs/api/payment-experience/#definition-presentation以获得类似的功能。

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

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