-
Notifications
You must be signed in to change notification settings - Fork 642
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
[Experimental] Add PaymentConfirmationMediator
& PaymentConfirmationRegistry
#9335
base: master
Are you sure you want to change the base?
Conversation
PaymentConfirmationMediator(savedStateHandle, definition) | ||
} | ||
} | ||
} |
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 was initially thinking of adding different list for pre-confirmation definitions, but I think that limits definitions to 0-1 pre-confirmation definition and 1 end-confirmation definition. I wonder if we should update the PaymentConfirmationDefinition
interface to indicate if it is the end state of confirmation or moving the confirmation state forward (Google Pay has provided a payment method, move to the next found definition)
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 would have to ensure though that the list is ordered correctly for each implementation through tests
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.
Example:
val registry = PaymentConfirmationRegistry(
definitions = listOf(
GooglePayConfirmationDefinition, // Not an end state definition
BacsConfirmationDefinition, // Not an end state definition
SepaMandateConfirmationDefinition, // Not an end state definition
CvcRecollectionConfirmationDefinition, // Not an end state definition
LinkConfirmationDefinition, // Not an end state definition
ExternalPaymentMethodsConfirmationDefinition, // An end state definition
IntentConfirmationDefinition, // An end state definition
)
)
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.
Plus side is we can have 1-to-many confirmation definitions
Diffuse output:
APK
|
Summary
Add
PaymentConfirmationMediator
&PaymentConfirmationRegistry
Motivation
Helps move all the
ConfirmationOption
andLauncher
abstractions into a mediator to manage the definitions.Testing
Screenshots
Changelog