-
Notifications
You must be signed in to change notification settings - Fork 677
Pass customer_id
to /lookup
calls.
#11195
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
Conversation
val result = linkRepository.lookupConsumer(email) | ||
val result = linkRepository.lookupConsumer( | ||
email = email, | ||
customerId = null |
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.
LinkController does not need to pass customer_id.
@@ -327,6 +327,7 @@ private class FinancialConnectionsConsumerSessionRepositoryImpl( | |||
appId = appId, | |||
sessionId = sessionId, | |||
requestOptions = provideApiRequestOptions(useConsumerPublishableKey = false), | |||
customerId = null |
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.
FC does not need to pass customer_id
Diffuse output:
APK
DEX
|
@@ -42,26 +42,33 @@ internal interface LinkAccountManager { | |||
* Optionally starts a user session, by storing the cookie for the account and starting a | |||
* verification if needed. | |||
* | |||
* When the [email] parameter is null, will try to fetch the account for the currently stored |
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.
email can't be null, deleting this comment.
7fbf2d8
to
547504a
Compare
/lookup
calls.customer_id
to /lookup
calls.
547504a
to
3f3d12f
Compare
3f3d12f
to
6cbd57a
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.
Just a few nits and a question. Nothing blocking if you don't think so and if CI passes.
@@ -35,7 +35,12 @@ internal data class LinkConfiguration( | |||
val collectMissingBillingDetailsForExistingPaymentMethods: Boolean, | |||
val allowUserEmailEdits: Boolean, | |||
val enableDisplayableDefaultValuesInEce: Boolean, | |||
val customerId: String? |
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.
should this be private val _customerId
to enforce/encourage usage of customerIdForEceDefaultValues
instead?
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.
good idea! f6d9b8a
@@ -35,7 +35,8 @@ internal class DefaultLinkAttestationCheck @Inject constructor( | |||
val lookupResult = linkAuth.lookUp( | |||
email = email, | |||
emailSource = EmailSource.CUSTOMER_OBJECT, | |||
startSession = false | |||
startSession = false, | |||
customerId = linkConfiguration.customerId |
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.
attestation doesn't need customerId
, right?
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.
it does - in prod we'll use the mobile/lookup endpoint for verified merchants as an extra layer of security too
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.
Correct if I'm wrong, but in this request in particular, it's only used for attestation. linkAuth.lookUp()
obtains an integrity check token, makes a request with it, and largely drops the result. Unless the customer ID is used in the backend for attestation, I don't think it's necessary.
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.
Discussed off thread. Though it's technically not used now, it may be later, so it could be a good idea to include today.
paymentsheet/src/test/java/com/stripe/android/link/account/DefaultLinkAccountManagerTest.kt
Outdated
Show resolved
Hide resolved
...let_LinkInline2FASectionScreenshotTest_testWithPaymentDetailsBank[DarkTheme,DefaultFont].png
Outdated
Show resolved
Hide resolved
f6d9b8a
to
c78b420
Compare
Summary
customer_id
to lookup calls so that we can obtain payment method info in the response.Motivation
Testing
Screenshots
Changelog