-
Notifications
You must be signed in to change notification settings - Fork 675
[BDCC] Allow email / phone / name collection on Link native #10984
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
base: master
Are you sure you want to change the base?
[BDCC] Allow email / phone / name collection on Link native #10984
Conversation
val cardMap = params["card"] as? Map<*, *>? | ||
val billingDetailsMap = params["billing_details"] as? Map<*, *>? |
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.
Add new card: we extract the billing phone from the create params (that's how the UI component bundles it) and pass it to the confirmation flow so that it's passed down in the share
endpoint.
@@ -117,6 +117,7 @@ internal class UpdateCardScreenViewModel @Inject constructor( | |||
selectedPaymentDetails = updatedPaymentDetails, | |||
linkAccount = account, | |||
cvc = null, // CVC is already included in the updated payment details | |||
billingPhoneNumber = cardParams.billingDetails?.phone, |
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.
Update card: we extract the billing phone from the update params (that's how the UI component bundles it) and pass it to the confirmation flow so that it's passed down in the share endpoint.
Diffuse output:
APK
|
@@ -262,6 +260,7 @@ internal class WalletViewModel @Inject constructor( | |||
selectedPaymentDetails = selectedPaymentDetails, | |||
linkAccount = linkAccount, | |||
cvc = cvc, | |||
billingPhoneNumber = linkAccount.unredactedPhoneNumber, |
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.
On the wallet, our only phone source without re-collecting is the link account. If there's no link account phone, the confirm details screen would pop up before reaching this.
7c7b2f1
to
5a5cee1
Compare
ff06269
to
5234ade
Compare
b8ce6b8
to
c228e5f
Compare
@@ -118,7 +118,8 @@ internal class UpdateCardScreenViewModel @Inject constructor( | |||
val confirmationResult = completeLinkFlow( |
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.
One limitation - if the user updates the billing phone here, since it does not get persisted in the consumer details object and it's used just when completing the flow, we might lose it.
PR follow-up will ensure we keep phone number changes from the update screen when returning to the wallet so that confirmation uses it.
74a3bc8
to
c470ea4
Compare
billingDetailsCollectionConfiguration = BillingDetailsCollectionConfiguration( | ||
address = addressCollectionMode | ||
), |
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.
@toluo-stripe Updated the CardEdit
Form to accept contact info (email, name, phone) if you can take a look!
Also could you confirm what BillingDetailsCollectionConfiguration
we want to pass outside of Link? With the current config it won't show any of these fields for collection, but it could if we pass the entire BDCC as we do on Link.
e19e296
to
a491628
Compare
a491628
to
e19e296
Compare
- Add ContactInformationFormUI to CardDetailsEditUI to collect name, email, phone - Update CardDetailsEntry to handle contact information in toUpdateParams - Modify EditCardDetailsInteractor to support ContactInformationChanged action - Update related tests to cover new contact information functionality
- Update LinkApiRepository to pass billing phone in share endpoint - Modify LinkConfirmationHandler to handle billing phone parameter - Update LinkAccountManager and related services to support phone collection - Add support for billing details configuration in Link flows - Update CompleteLinkFlow to collect and pass billing information - Add comprehensive tests for billing details integration
e19e296
to
1d5d0c4
Compare
val billingPhone: Map<String, String> = paymentMethodCreateParams.billingDetails?.phone?.let { | ||
mapOf("billing_phone" to it) | ||
} ?: emptyMap() |
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.
the share endpoint was missing the billingPhone
.
Summary
CardDetailsEdit
, that now accepts the full BDCC objectname + email
are passed when saving the PM details.phoneNumber
is used when callingshare
.full_bdcc.mp4
Testing
Screenshots
Changelog