-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use locale in PopupPayload
#8147
Conversation
Diffuse output:
APK
DEX
|
customerCountryCode: String? | ||
): LinkConfiguration { | ||
return LinkConfiguration( | ||
merchantName = "Jay's Taco Stand", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😆
@@ -58,4 +111,16 @@ internal class PopupPayloadTest { | |||
"link_passthrough_mode_enabled" to true, | |||
), | |||
) | |||
|
|||
private fun getContext(locale: Locale): Context { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems useful! Do we have test utils or anything like that? It'd be nice to have an easy way to find functions like this if I ever wanted to use one. Not necessary for this PR just an idea :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a test util for this as part of the new testing module @tjclawson-stripe will be adding.
Summary
In
PopupPayload
, we currently use the customer's provided info to fetch their billing country. If the customer does not have a provided billing country, then we use the merchant's billing country.There's a good chance the merchant and customer do not have the same billing country. Using the device's locale gives us a more accurate result of the customer's billing country.
Motivation
Resolves MOBILESDK-1852
iOS also uses the intent's billing country as a third backup but on Android we have a guaranteed locale returned.
Testing