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
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Creating a customized checkout experience in PayPal Payments Standard
- Availability of Advanced Credit/Debit Card Payments for UAE Merchants in PayPal Payments Standard
- PayPal Standard Checkout - Idiot's Guide? in PayPal Payments Standard
- Payment approval does not redirect to return_url in sandbox in Sandbox Environment