Skip to content
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

feat(POM-419): Dynamic Checkout lifecycle events #233

Merged
merged 37 commits into from
Oct 25, 2024

Conversation

vitalii-vanziak-cko
Copy link
Collaborator

@vitalii-vanziak-cko vitalii-vanziak-cko commented Oct 24, 2024

Description

Refactored:

  1. Added val original: PODynamicCheckoutPaymentMethod to all internal PaymentMethod interactor types. It is needed for lifecycle events and make it easy to access the original type without the need to lookup for it.
  2. Changed DynamicCheckoutInteractorState to keep the whole PaymentMethod object instead of only IDs for the following states (allows to avoid lookup for the object by id and simplifies the logic):
    selectedPaymentMethodId -> selectedPaymentMethod
    processingPaymentMethodId -> processingPaymentMethod
    pendingSubmitPaymentMethodId -> pendingSubmitPaymentMethod
  3. Refactored startup concurrency to send lifecycle events at correct moment.
  4. Extracted some methods for readability.

Added:

  1. PODynamicCheckoutEvent and sending all lifecycle events.
  2. PODynamicCheckoutDelegate dispatching preferredScheme (for card) and defaultValues (for nAPM).
  3. Added PODynamicCheckoutPaymentMethod.Display.description, it used as text for customer token payment types (card and APM) with fallback to display.name when null.
  4. logAttributes but not used yet, logs will be added in separate PR.

Jira Issue

https://checkout.atlassian.net/browse/POM-419

@vitalii-vanziak-cko vitalii-vanziak-cko merged commit 85950c8 into master Oct 25, 2024
1 check passed
@vitalii-vanziak-cko vitalii-vanziak-cko deleted the feat/POM-419/dc-lifecycle-events branch October 25, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants