-
Notifications
You must be signed in to change notification settings - Fork 645
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
Add synthetic payment method for LinkCardBrand #9288
Conversation
3480837
to
84ce028
Compare
cfc2417
to
2a31812
Compare
Diffuse output:
APK
|
84ce028
to
08b9c9c
Compare
2a31812
to
e1492e3
Compare
7c3a9c8
to
b8c2541
Compare
b4f17c0
to
070b99b
Compare
4bf0eb2
to
aefae6d
Compare
...sheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/PaymentMethodMetadata.kt
Outdated
Show resolved
Hide resolved
import com.stripe.android.uicore.elements.FormElement | ||
import com.stripe.android.ui.core.R as PaymentsUiCoreR | ||
|
||
internal object LinkCardBrandDefinition : PaymentMethodDefinition { |
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 is identical to InstantDebitsDefinition
. Once we move the bank form to a proper UiDefinitionFactory
, we can also deduplicate this.
aa6968f
to
941ec2c
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.
I imagine these updated since US Bank Account
wasn't in the list of supported payment method types?
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.
That’s because of this change. It’ll only show up if linkMode == LinkCardBrand
, and we’re restricting this to our test merchants for now.
...eet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/PaymentMethodDefinition.kt
Outdated
Show resolved
Hide resolved
}.filterNot { | ||
} | ||
|
||
val syntheticPaymentMethodTypes = listOf(LinkCardBrandDefinition).filter { |
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 we model synthetics differently? It doesn't feel like this logic belongs here as is.
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.
I don’t see them as being very different from “normal” payment method definitions.
}, | ||
|
||
/** Requires that LinkCardBrand is possible for this transaction. */ | ||
LinkCardBrand { |
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.
Do we need to make sure they also have card as an available payment method?
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.
No, we only receive the LinkCardBrand
mode if there’s a card
type (see here).
3a62ad2
to
b0f7a69
Compare
b0f7a69
to
25696f1
Compare
Summary
This pull request adds a “synthetic” payment method for
LinkCardBrand
.We don’t receive the
LinkCardBrand
type as a payment method type in the intent, so we must add it after the fact inPaymentMethodMetadata
.Motivation
BANKCON-14522
Testing
Screenshots
Changelog