PayPal Checkout experience localizations
adam_richard
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Aug-27-2020
01:49 PM
Hi, everyone,
Looks like /v2/checkout/orders from PHP Checkout SDK's OrdersCreateRequest object fails to set PayPal Checkout experience UI localization texts when returned from Smart Payment Button's createOrder server callback.
For reference, locale property of application_context object is setted as follow:
$request = new OrdersCreateRequest();
$request->body = [
// ...
'application_context' => [
'user_action' => 'PAY_NOW'
'shipping_preference' => 'NO_SHIPPING',
// tested with 'en-US', 'es-ES' and 'pt-BR'
'locale' => $UI_LANG_VARIABLE
]
];
$request->prefer('return=representation');
$response = $client->execute($request);
Button UI's texts respects locale query parameter tho.
Have anyone succeed to set locale dynamically? or ... maybe willing to suggest some insight about this?
Thanks, guys.
Labels:
- Labels:
-
SDK
1 REPLY 1
1233fsdfsdg
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun-18-2021
08:06 AM
I did it in Java SDK, no problem with it.
ApplicationContext applicationContext = new ApplicationContext().brandName(BRAND_NAME).landingPage(LANDING_PAGE)
.cancelUrl(cancelUrl).returnUrl(returnUrl).userAction(USER_ACTION).locale(locale)

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- How to enable on-demand / recurring payments to existing PayPal checkout? in SDKs
- Does the PayPal Checkout Standard integration support Apple Pay and Google Pay out of the box? in REST APIs
- Payment link guest checkout in PayPal Payments Standard
- WooCommerce Integration Issue: PayPal Login Not Completing Purchases in PayPal Payments Standard
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community