Skip to content

Conversation

@PavlenkoM
Copy link
Contributor

@PavlenkoM PavlenkoM commented Nov 25, 2025

What/Why?

Broadcast checkout locale to Stripe components to display Stripe fields with the same language as the whole page

Rollout/Rollback

Rollback this PR

Testing

Stripe UPE

en-fr.mov
Screen.Recording.2025-11-25.at.15.08.32.mov

Stripe OCS

Screen.Recording.2025-11-25.at.16.09.11.mov


this._stripeUPEClient = await this._stripeUPEScriptLoader.getStripeClient(
initializationData,
state.config.getLocale(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locale should be fetched from cart and not from config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locale should be fetched from cart and not from config.

But it seems that paymentIntegrationService get locale from config?


And I don't see locale in cart selector and Cart interface, or I missed something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for multi lang cart locale will be the source of truth. So this will be not the correct product behaviour.

cc @kristinapototska

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for multi lang cart locale will be the source of truth. So this will be not the correct product behaviour.

But am I correct that we don't have any solution to get locale from cart on checkout?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PavlenkoM @animesh1987 each storefront might have one or multiple locales enabled. When it's multiple locales, e.g. EN, FR and DE if I as a shopper selected FR and was browsing storefront in FR, we need to display experience in FR all the way through cart, checkout and post order experience.
In order to do so, we are passing shopper preferred locale to checkout and it gets propagated to downstream services (order, emails) from there.

And we need the same locale to be passed to payment providers (Stripe) to make sure the experience is consistent for the shopper across all the touch points. @PavlenkoM config would only give you info that the storefront (channel) has 3 locales EN, FR and DE but will not tell you that shopper was browsing storefront in FR.
This info can be parced from either storefront or checkout.

But am I correct that we don't have any solution to get locale from cart on checkout?

It can be fetched from get cart request afaik

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kristinapototska for clarification.

About solution it was a question to @animesh1987 . Did I miss something and we already has checkout logic for this, or I need to create this functionality for core part of checkout? He answered in the another comment. Thanks.

@PavlenkoM PavlenkoM marked this pull request as ready for review November 25, 2025 13:32
@PavlenkoM PavlenkoM requested a review from a team as a code owner November 25, 2025 13:32
Copy link
Contributor

@animesh1987 animesh1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to get locale from cart. Feel free to create a method in integrations to get the locale.

@PavlenkoM PavlenkoM requested a review from a team as a code owner November 26, 2025 14:44
@PavlenkoM
Copy link
Contributor Author

Need to get locale from cart. Feel free to create a method in integrations to get the locale.

Hi @animesh1987
I added localization from the cart data. Can you please take a look?

@PavlenkoM PavlenkoM merged commit 01b4fbb into bigcommerce:master Dec 4, 2025
4 checks passed
@PavlenkoM PavlenkoM deleted the STRIPE-1130 branch December 4, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants