-
Notifications
You must be signed in to change notification settings - Fork 665
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
Improve prefill in bank flows #9518
Improve prefill in bank flows #9518
Conversation
Diffuse output:
APK
|
4251f7a
to
80d5a57
Compare
@@ -151,7 +151,9 @@ private fun NetworkingLinkSignupLoaded( | |||
LaunchedEffect(showFullForm) { | |||
if (showFullForm) { | |||
scrollState.animateScrollToBottom() | |||
phoneNumberFocusRequester.requestFocus() | |||
if (payload.focusPhoneFieldOnShow) { |
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 don't need to focus the phone field if there’s already a value.
53de145
to
af00802
Compare
|
||
private fun makePrefillDetails(): ElementsSessionContext.PrefillDetails { | ||
return ElementsSessionContext.PrefillDetails( | ||
email = email.value ?: defaultBillingDetails?.email, |
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 want to fall back to any billing details that the merchant has passed in, even if it’s not being attached to the PaymentMethod
.
email?.let { queryParams.add("email=$it") } | ||
phone?.let { queryParams.add("linkMobilePhone=$it") } | ||
phoneCountry?.let { queryParams.add("linkMobilePhoneCountry=$it") } |
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.
Doing this outside of Instant Debits, as this also applies to the Networking flow.
af00802
to
c3ebcef
Compare
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.
👏
val linkMode = elementsSessionContext?.linkMode | ||
|
||
val prefillDetails = elementsSessionContext?.prefillDetails | ||
val email = prefillDetails?.email |
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.
nit - we can likely inline this when adding query params (unless it makes them 2-liners)
Summary
This pull request adds
PrefillDetails
toElementsSessionContext
, which helps us prefill the form in the bank auth flow — both in the native and in the web flow.This is irrespective of #9446, which is about the billing details we use when we construct the
PaymentMethod
object.Motivation
Testing
Screenshots
Changelog