-
Notifications
You must be signed in to change notification settings - Fork 704
Filter by funding type in Google Pay #12117
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?
Conversation
|
Diffuse output: APKDEX |
daa8f44 to
4acd8c8
Compare
280c8d8 to
7ed8343
Compare
| cardFundingFilter = DefaultCardFundingFilter, | ||
| cardBrandFilter = DefaultCardBrandFilter |
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 not used to present Google, but only to determine the ready state, hence the default filter implementations are fine here. Plus, this state is fetched async before we get the elements session. Using the merchant defined filters will require use to wait for elements session to load so we can use the feature flag, and would make latency worse.
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.
Might be worth a code comment, as this feels relevant long term.
| private suspend fun isGooglePaySupportedOnDevice(): Boolean { | ||
| return googlePayRepositoryFactory(GooglePayEnvironment.Production).isReady().first() | ||
| return googlePayRepositoryFactory( | ||
| environment = GooglePayEnvironment.Production, | ||
| cardBrandFilter = DefaultCardBrandFilter, | ||
| cardFundingFilter = DefaultCardFundingFilter | ||
| ).isReady().first() | ||
| } |
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.
ditto
7ed8343 to
fcc1d83
Compare
| cardFundingFilter = DefaultCardFundingFilter, | ||
| cardBrandFilter = DefaultCardBrandFilter |
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.
Might be worth a code comment, as this feels relevant long term.
| "allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"], | ||
| "allowedCardNetworks": ["AMEX", "DISCOVER", "MASTERCARD", "VISA"] | ||
| "allowedCardNetworks": ["AMEX", "DISCOVER", "MASTERCARD", "VISA"], | ||
| "allowCreditCards": true, |
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 my only FUD with this PR.
Can you manually test to make sure no unexpected behavior changes happen as a result of us sending true here.
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.
Yh, I'm able to get it working for the Google Pay Button, but the Google Pay Sheet isn't adhering to this setting (even after hardcoding it). It always shows both credit and debit cards. I'm confirming with @samer-stripe to see if it's something we can only test in a Prod Google Pay environment.
Credit Cards Disabled (Google Pay Button)

Credit Cards Enabled (Google Pay Button)

Google Pay Sheet
Summary
Filter by funding type in Google Pay
Motivation
Testing
Screenshots
Changelog