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

Release 5.4.0 #1642

Merged
merged 345 commits into from
May 30, 2024
Merged

Release 5.4.0 #1642

merged 345 commits into from
May 30, 2024
This pull request is big! We’re only showing the most recent 250 commits.

Commits on May 1, 2024

  1. Configuration menu
    Copy the full SHA
    0d69e5d View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1595 from Adyen/renovate/detekt_version

    Update detekt_version to v1.23.6
    jreij authored May 1, 2024
    Configuration menu
    Copy the full SHA
    754283a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a85e1bb View commit details
    Browse the repository at this point in the history
  4. Merge pull request #1596 from Adyen/renovate/hilt_version

    Update hilt_version to v2.51.1
    OscarSpruit authored May 1, 2024
    Configuration menu
    Copy the full SHA
    c58a06e View commit details
    Browse the repository at this point in the history
  5. Make sure android tests can run

    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    5d94f9a View commit details
    Browse the repository at this point in the history
  6. Setup basic UI test

    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    0d63171 View commit details
    Browse the repository at this point in the history
  7. Add github workflow to run UI tests

    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    911e059 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7ebba5b View commit details
    Browse the repository at this point in the history
  9. Override local.gradle values for CI builds

    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    0f378c2 View commit details
    Browse the repository at this point in the history
  10. Make cache read-only for small steps

    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    6a1eee7 View commit details
    Browse the repository at this point in the history
  11. Run assemble in check_develop

    This will create a build cache that can be used by other branches.
    
    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    a6520fe View commit details
    Browse the repository at this point in the history
  12. Run UI tests on every push to develop

    COAND-851
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    a9045c7 View commit details
    Browse the repository at this point in the history
  13. Merge pull request #1561 from Adyen/setup-ui-testing

    Setup UI testing
    OscarSpruit authored May 1, 2024
    Configuration menu
    Copy the full SHA
    b937ea4 View commit details
    Browse the repository at this point in the history
  14. Use full qualified name to store action configurations in CheckoutCon…

    …figuration
    
    This solves a crash where configurations would get the same name when they are obfuscated.
    
    COAND-902
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    688e27e View commit details
    Browse the repository at this point in the history
  15. Add release note

    COAND-902
    OscarSpruit committed May 1, 2024
    Configuration menu
    Copy the full SHA
    6320c6c View commit details
    Browse the repository at this point in the history
  16. Merge pull request #1592 from Adyen/fix/config-obfuscation

    Fix crash caused by obfuscation of action configurations
    OscarSpruit authored May 1, 2024
    Configuration menu
    Copy the full SHA
    c082d19 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    126671d View commit details
    Browse the repository at this point in the history
  18. Merge pull request #1597 from Adyen/renovate/detekt_gradle_plugin_ver…

    …sion
    
    Update plugin io.gitlab.arturbosch.detekt to v1.23.6
    OscarSpruit authored May 1, 2024
    Configuration menu
    Copy the full SHA
    9133947 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    1d5ae5e View commit details
    Browse the repository at this point in the history
  20. Merge pull request #1602 from Adyen/renovate/mockito_kotlin_version

    Update dependency org.mockito.kotlin:mockito-kotlin to v5.3.1
    OscarSpruit authored May 1, 2024
    Configuration menu
    Copy the full SHA
    3e31323 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    9c58cf6 View commit details
    Browse the repository at this point in the history
  22. Merge pull request #1607 from Adyen/renovate/jamesives-github-pages-d…

    …eploy-action-4.x
    
    Update JamesIves/github-pages-deploy-action action to v4.6.0
    jreij authored May 1, 2024
    Configuration menu
    Copy the full SHA
    f98d311 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    8a026ba View commit details
    Browse the repository at this point in the history
  24. Merge pull request #1606 from Adyen/renovate/retrofit2_version

    Update retrofit2_version to v2.11.0
    jreij authored May 1, 2024
    Configuration menu
    Copy the full SHA
    eafaff6 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    34007da View commit details
    Browse the repository at this point in the history

Commits on May 2, 2024

  1. Merge pull request #1608 from Adyen/renovate/kotlin

    Update dependency composeOptions to v1.5.12
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    9079724 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5118a22 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1598 from Adyen/renovate/dokka_version

    Update plugin org.jetbrains.dokka to v1.9.20
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    45e2579 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2ffd8aa View commit details
    Browse the repository at this point in the history
  5. Merge pull request #1609 from Adyen/renovate/compose_activity_version

    Update dependency androidx.activity:activity-compose to v1.9.0
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    60b4f8f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fecfd4b View commit details
    Browse the repository at this point in the history
  7. Merge pull request #1600 from Adyen/renovate/compose_bom_version

    Update dependency androidx.compose:compose-bom to v2024.04.01
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    35c30ea View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0e2fac7 View commit details
    Browse the repository at this point in the history
  9. Merge pull request #1603 from Adyen/renovate/barista_version

    Update dependency com.adevinta.android:barista to v4.3.0
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    0af6d69 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    16101c0 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #1604 from Adyen/renovate/robolectric_version

    Update dependency org.robolectric:robolectric to v4.12.1
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    7abf96a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9d1cdd8 View commit details
    Browse the repository at this point in the history
  13. Update verification metadata

    jreij committed May 2, 2024
    Configuration menu
    Copy the full SHA
    b871773 View commit details
    Browse the repository at this point in the history
  14. Merge pull request #1593 from Adyen/renovate/android_gradle_plugin_ve…

    …rsion
    
    Update android_gradle_plugin_version to v8.3.2
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    1c0efad View commit details
    Browse the repository at this point in the history
  15. Fix inaccurate client key validation regex

    COAND-905
    jreij committed May 2, 2024
    Configuration menu
    Copy the full SHA
    f4423b6 View commit details
    Browse the repository at this point in the history
  16. Always validate client key and environment together

    COAND-905
    jreij committed May 2, 2024
    Configuration menu
    Copy the full SHA
    ad599ea View commit details
    Browse the repository at this point in the history
  17. Merge pull request #1611 from Adyen/refactor/improve-client-key-valid…

    …ation
    
    Improve client key validation
    jreij authored May 2, 2024
    Configuration menu
    Copy the full SHA
    a028156 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    cb4387f View commit details
    Browse the repository at this point in the history

Commits on May 3, 2024

  1. Merge pull request #1599 from Adyen/renovate/browser_version

    Update dependency androidx.browser:browser to v1.8.0
    jreij authored May 3, 2024
    Configuration menu
    Copy the full SHA
    96bae64 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a05e8d2 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1601 from Adyen/renovate/gradle-8.x

    Update dependency gradle to v8.7
    jreij authored May 3, 2024
    Configuration menu
    Copy the full SHA
    4f850d8 View commit details
    Browse the repository at this point in the history
  4. Disable recompilation by the sonar command

    Sonar currently doesn't pick this up from the gradle configuration, thus has to be passed in the command.
    https://community.sonarsource.com/t/sonar-gradle-skipcompile-is-not-working/102710
    OscarSpruit committed May 3, 2024
    Configuration menu
    Copy the full SHA
    e48dca4 View commit details
    Browse the repository at this point in the history
  5. Remove no-daemon flag for CI builds

    Gradle doesn't recommend this anymore.
    OscarSpruit committed May 3, 2024
    Configuration menu
    Copy the full SHA
    8ca97d3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    21ba8c7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ba91dd8 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #1605 from Adyen/fix/sonar-build-time

    Speed up sonar
    OscarSpruit authored May 3, 2024
    Configuration menu
    Copy the full SHA
    d571501 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7374f46 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    dd776a3 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #1614 from Adyen/refactor/non-transitive-r

    Migrate to non-transitive R classes
    OscarSpruit authored May 3, 2024
    Configuration menu
    Copy the full SHA
    0700f86 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2024

  1. Configuration menu
    Copy the full SHA
    9b95814 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1621 from Adyen/revert-1601-renovate/gradle-8.x

    Revert gradle to v8.6
    jreij authored May 6, 2024
    Configuration menu
    Copy the full SHA
    16cf8b3 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2024

  1. Configuration menu
    Copy the full SHA
    b171b87 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2024

  1. Merge pull request #1612 from Adyen/fix/submit-button

    Display pay button in components if created by drop in
    ozgur00 authored May 8, 2024
    Configuration menu
    Copy the full SHA
    2b76b40 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2024

  1. Migrate to KSP

    OscarSpruit committed May 10, 2024
    Configuration menu
    Copy the full SHA
    acf30fb View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1613 from Adyen/refactor/ksp

    Migrate to KSP
    OscarSpruit authored May 10, 2024
    Configuration menu
    Copy the full SHA
    2e4fe73 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. Configuration menu
    Copy the full SHA
    20a15ca View commit details
    Browse the repository at this point in the history
  2. Update release notes

    jreij committed May 13, 2024
    Configuration menu
    Copy the full SHA
    b1addd4 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1625 from Adyen/renovate/adyen3ds2_version

    Update dependency com.adyen.threeds:adyen-3ds2 to v2.2.18
    jreij authored May 13, 2024
    Configuration menu
    Copy the full SHA
    d33ee95 View commit details
    Browse the repository at this point in the history

Commits on May 14, 2024

  1. Use existing ActionComponentDialogFragment instance to handle consecu…

    …tive actions
    
    This is only applicable for 3DS2 with API v66 and before, where the payments call return one action (fingerprint) then the details call returns another action (challenge) both of which need to be handled with the same component
    COAND-906
    jreij committed May 14, 2024
    Configuration menu
    Copy the full SHA
    3cc0ae2 View commit details
    Browse the repository at this point in the history
  2. Update release notes

    COAND-906
    jreij committed May 14, 2024
    Configuration menu
    Copy the full SHA
    0f1473f View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1629 from Adyen/fix/old-3ds2-flow-drop-in

    Fix drop-in unable to handle 3DS2 on API v66 and below
    jreij authored May 14, 2024
    Configuration menu
    Copy the full SHA
    10cc7e4 View commit details
    Browse the repository at this point in the history
  4. Extract launching custom tabs to a new class

    COAND-907
    jreij committed May 14, 2024
    Configuration menu
    Copy the full SHA
    33616ee View commit details
    Browse the repository at this point in the history
  5. Add separate style for custom tabs

    COAND-907
    jreij committed May 14, 2024
    Configuration menu
    Copy the full SHA
    609fc37 View commit details
    Browse the repository at this point in the history
  6. Update release notes and customization guide

    COAND-907
    jreij committed May 14, 2024
    Configuration menu
    Copy the full SHA
    5d5b6af View commit details
    Browse the repository at this point in the history
  7. Directly use attr instead of inside a styleable

    COAND-907
    jreij committed May 14, 2024
    Configuration menu
    Copy the full SHA
    4b348a9 View commit details
    Browse the repository at this point in the history

Commits on May 15, 2024

  1. Merge pull request #1628 from Adyen/feature/custom-tabs-styling

    Support changing the custom tabs toolbar and navigation colors
    jreij authored May 15, 2024
    Configuration menu
    Copy the full SHA
    6aa503b View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Add AndroidX Startup dependency

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    a687eaf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    46bdb44 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    88cb37d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a850d0f View commit details
    Browse the repository at this point in the history
  5. Remove AndroidX startup library

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    1bb2952 View commit details
    Browse the repository at this point in the history
  6. Add unit test

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    98cbf53 View commit details
    Browse the repository at this point in the history
  7. Add release note

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    1d02cb7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5b792ed View commit details
    Browse the repository at this point in the history
  9. Try to restore state of DefaultVoucherDelegate

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    eebda82 View commit details
    Browse the repository at this point in the history
  10. Try to restore state of DefaultAwaitDelegate

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    215914f View commit details
    Browse the repository at this point in the history
  11. Try to restore state of DefaultQRCodeDelegate

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    30dfdab View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    59ee90a View commit details
    Browse the repository at this point in the history
  13. Don't save action in DefaultGenericActionDelegate

    The specific action delegates should do this since they share a SavedStateHandle and
    are also responsible for removing it.
    
    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    98236be View commit details
    Browse the repository at this point in the history
  14. Clear state when flow is final in await

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    93c3900 View commit details
    Browse the repository at this point in the history
  15. Split restoring qr and redirect action state restoration for DefaultQ…

    …rCodeDelegate
    
    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    616c080 View commit details
    Browse the repository at this point in the history
  16. Clear state when flow is final in qr code

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    189e0e4 View commit details
    Browse the repository at this point in the history
  17. Clear state when flow is final in voucher

    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    f197ee1 View commit details
    Browse the repository at this point in the history
  18. Make naming consistent between action delegates

    Not for 3ds2 and WeChat though, because they are too specific.
    
    COAND-857
    OscarSpruit committed May 16, 2024
    Configuration menu
    Copy the full SHA
    ce91061 View commit details
    Browse the repository at this point in the history
  19. Merge pull request #1489 from Adyen/fix/restore-action-handling-state

    Restore action handling state
    OscarSpruit authored May 16, 2024
    Configuration menu
    Copy the full SHA
    6edff78 View commit details
    Browse the repository at this point in the history

Commits on May 21, 2024

  1. Restore 3ds2 delegate after process dies

    COAND-857
    OscarSpruit committed May 21, 2024
    Configuration menu
    Copy the full SHA
    62a1234 View commit details
    Browse the repository at this point in the history
  2. Make sure 3DS2s ChallengeStatusHandler survives process death

    This makes sure the final result from the 3DS2 SDK will be correctly delivered to the newly created delegate.
    
    COAND-857
    OscarSpruit committed May 21, 2024
    Configuration menu
    Copy the full SHA
    59bdcf1 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Don't save authorization token anymore

    The action is saved now, which holds the authorization token.
    
    COAND-857
    OscarSpruit committed May 22, 2024
    Configuration menu
    Copy the full SHA
    7442464 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1632 from Adyen/fix/restore-3ds2-state

    Restore 3DS2 state after process death
    OscarSpruit authored May 22, 2024
    Configuration menu
    Copy the full SHA
    5c7bdaf View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. Update sonar

    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    e72558b View commit details
    Browse the repository at this point in the history
  2. Split sonar command

    This makes sure sonar runs after the other tasks are completed
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    f770073 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1635 from Adyen/fix/sonar

    Fix sonar
    OscarSpruit authored May 23, 2024
    Configuration menu
    Copy the full SHA
    0316c80 View commit details
    Browse the repository at this point in the history
  4. Create twint module

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    f98fdbc View commit details
    Browse the repository at this point in the history
  5. Setup basic component + delegate

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    809c282 View commit details
    Browse the repository at this point in the history
  6. Add Twint library

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    33898ef View commit details
    Browse the repository at this point in the history
  7. Implement TwintDelegate

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    089ca02 View commit details
    Browse the repository at this point in the history
  8. Add support for Twint in drop-in

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    bacb2f3 View commit details
    Browse the repository at this point in the history
  9. Publish Twint SDK as a standalone dependency

    It is not possible to publish nested AAR files, so we have to
    publish the Twint AAR as a standalone dependency.
    
    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    6a21b74 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7bb498b View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6aeeeee View commit details
    Browse the repository at this point in the history
  12. Add unit tests

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    00be242 View commit details
    Browse the repository at this point in the history
  13. Use compileOnly for twint in action-core

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    64b006d View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    0690fab View commit details
    Browse the repository at this point in the history
  15. Add documentation to the Twint object

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    3231108 View commit details
    Browse the repository at this point in the history
  16. Update to Twint 8.0.0

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    6a4e627 View commit details
    Browse the repository at this point in the history
  17. Implement polling mechanism for Twint

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    ee174f3 View commit details
    Browse the repository at this point in the history
  18. Fix action component callback leak

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    5dbf865 View commit details
    Browse the repository at this point in the history
  19. Wrap Twint in a fragment

    This makes it possible for us to handle the activity result stuff and makes
    the implementation for a merchant significantly easier.
    
    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    f8d3456 View commit details
    Browse the repository at this point in the history
  20. Add TwintActionConfigurationTest

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    d978fa8 View commit details
    Browse the repository at this point in the history
  21. Add release notes

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    d7cf94a View commit details
    Browse the repository at this point in the history
  22. Restore state when process dies

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    89498c8 View commit details
    Browse the repository at this point in the history
  23. Add more tests

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    02f6563 View commit details
    Browse the repository at this point in the history
  24. Add comment to explain LayoutInflater problem

    COAND-806
    OscarSpruit committed May 23, 2024
    Configuration menu
    Copy the full SHA
    a1cdfec View commit details
    Browse the repository at this point in the history
  25. Update ActionHandlingMethod explanation

    COAND-806
    
    Co-authored-by: Ararat Mnatsakanyan <ararat.mnatsakanyan.ararat@gmail.com>
    OscarSpruit and araratthehero committed May 23, 2024
    Configuration menu
    Copy the full SHA
    f5430ea View commit details
    Browse the repository at this point in the history

Commits on May 24, 2024

  1. Merge pull request #1630 from Adyen/feature/twint_sdk

    Integrate with Twint SDK
    OscarSpruit authored May 24, 2024
    Configuration menu
    Copy the full SHA
    990e808 View commit details
    Browse the repository at this point in the history
  2. Add secondary text color

    COAND-912
    OscarSpruit committed May 24, 2024
    Configuration menu
    Copy the full SHA
    0b337d2 View commit details
    Browse the repository at this point in the history
  3. Display country picker entries correctly

    COAND-912
    OscarSpruit committed May 24, 2024
    Configuration menu
    Copy the full SHA
    de9b80b View commit details
    Browse the repository at this point in the history
  4. Preselect Portuguese country code for MBWay

    COAND-912
    OscarSpruit committed May 24, 2024
    Configuration menu
    Copy the full SHA
    adb0a52 View commit details
    Browse the repository at this point in the history
  5. Align dropdown arrow correctly in MBWay view

    COAND-912
    OscarSpruit committed May 24, 2024
    Configuration menu
    Copy the full SHA
    6c782ed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9372060 View commit details
    Browse the repository at this point in the history
  7. Sort country list by localized country name

    COAND-912
    OscarSpruit committed May 24, 2024
    Configuration menu
    Copy the full SHA
    7fa5f62 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2024

  1. Configuration menu
    Copy the full SHA
    d17d0a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    83ee09e View commit details
    Browse the repository at this point in the history
  3. Merge pull request #1633 from Adyen/fix/country-drop-down

    Change phone number country code picker
    OscarSpruit authored May 28, 2024
    Configuration menu
    Copy the full SHA
    0d77481 View commit details
    Browse the repository at this point in the history
  4. Use getBooleanOrNull instead of optBoolean for enableStoreDetails and…

    … showRemovePaymentMethodButton
    
    COAND-913
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d1d9cb0 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #1637 from Adyen/fix/stored_payment_methods_remova…

    …l_old_integration_fix
    
    Fix storedPaymentMethod removal for older integrations
    araratthehero authored May 28, 2024
    Configuration menu
    Copy the full SHA
    6947855 View commit details
    Browse the repository at this point in the history
  6. Setup analytics base

    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d852fcd View commit details
    Browse the repository at this point in the history
  7. Implement analytics setup call

    COAND-844
    
    diff --git a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AdyenAnalytics.kt b/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AdyenAnalytics.kt
    deleted file mode 100644
    index 4106710ea..000000000
    --- a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AdyenAnalytics.kt
    +++ /dev/null
    @@ -1,24 +0,0 @@
    -/*
    - * Copyright (c) 2024 Adyen N.V.
    - *
    - * This file is open source and available under the MIT license. See the LICENSE file for more info.
    - *
    - * Created by oscars on 6/2/2024.
    - */
    -
    -package com.adyen.checkout.core.internal.analytics
    -
    -import androidx.annotation.RestrictTo
    -
    -@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    -class AdyenAnalytics {
    -
    -    fun setup() {
    -        // See DefaultAnalyticsRepository.setupAnalytics
    -    }
    -
    -    fun track(event: AnalyticsEvent) {
    -        // Queue the event
    -        // Send it
    -    }
    -}
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AdyenAnalytics.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AdyenAnalytics.kt
    new file mode 100644
    index 000000000..d012b5721
    --- /dev/null
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AdyenAnalytics.kt
    @@ -0,0 +1,92 @@
    +/*
    + * Copyright (c) 2024 Adyen N.V.
    + *
    + * This file is open source and available under the MIT license. See the LICENSE file for more info.
    + *
    + * Created by oscars on 12/2/2024.
    + */
    +
    +package com.adyen.checkout.components.core.internal.analytics
    +
    +import androidx.annotation.RestrictTo
    +import androidx.annotation.VisibleForTesting
    +import com.adyen.checkout.components.core.internal.data.api.AnalyticsService
    +import com.adyen.checkout.components.core.internal.ui.model.AnalyticsParams
    +import com.adyen.checkout.components.core.internal.ui.model.AnalyticsParamsLevel
    +import com.adyen.checkout.core.AdyenLogLevel
    +import com.adyen.checkout.core.internal.util.adyenLog
    +import com.adyen.checkout.core.internal.util.runSuspendCatching
    +import kotlinx.coroutines.CoroutineDispatcher
    +import kotlinx.coroutines.CoroutineScope
    +import kotlinx.coroutines.Dispatchers
    +import kotlinx.coroutines.SupervisorJob
    +import kotlinx.coroutines.launch
    +
    +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    +class AdyenAnalytics(
    +    private val analyticsProvider: AnalyticsProvider,
    +    private val analyticsParams: AnalyticsParams,
    +    private val analyticsService: AnalyticsService,
    +    coroutineDispatcher: CoroutineDispatcher = Dispatchers.Default,
    +) {
    +
    +    // TODO: Check if Job or SupervisorJob is better for us
    +    private val coroutineScope = CoroutineScope(coroutineDispatcher + SupervisorJob())
    +
    +    @volatile
    +    var checkoutAttemptId: String? = null
    +        private set
    +
    +    @volatile
    +    private var state: State = State.Uninitialized
    +
    +    fun setup() {
    +        if (cannotSendEvent()) {
    +            checkoutAttemptId = CHECKOUT_ATTEMPT_ID_FOR_DISABLED_ANALYTICS
    +            return
    +        }
    +
    +        if (state != State.Uninitialized) return
    +        state = State.InProgress
    +        adyenLog(AdyenLogLevel.VERBOSE) { "Setting up analytics" }
    +
    +        coroutineScope.launch {
    +            runSuspendCatching {
    +                val analyticsSetupRequest = analyticsProvider.provide()
    +                val response = analyticsService.setupAnalytics(analyticsSetupRequest, analyticsParams.clientKey)
    +                checkoutAttemptId = response.checkoutAttemptId
    +                state = State.Ready
    +                adyenLog(AdyenLogLevel.VERBOSE) { "Analytics setup call successful" }
    +            }.onFailure { e ->
    +                state = State.Failed
    +                adyenLog(AdyenLogLevel.ERROR) {
    +                    "Failed to send analytics setup call - ${e::class.simpleName}: ${e.message}"
    +                }
    +            }
    +        }
    +    }
    +
    +    fun track(event: AnalyticsEvent) {
    +        // TODO: Check if we can send events anyway, because attempt id is anonymous already
    +        if (cannotSendEvent()) return
    +
    +        // Queue the event
    +        // Send it
    +    }
    +
    +    private fun cannotSendEvent(): Boolean {
    +        return analyticsParams.level.priority <= AnalyticsParamsLevel.NONE.priority
    +    }
    +
    +    companion object {
    +        private const val CHECKOUT_ATTEMPT_ID_FOR_DISABLED_ANALYTICS = "do-not-track"
    +    }
    +
    +    @VisibleForTesting
    +    internal sealed class State {
    +        data object Uninitialized : State()
    +        data object InProgress : State()
    +        data object Ready : State()
    +        data object Failed : State()
    +    }
    +}
    diff --git a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AnalyticsEventApi.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsEventApi.kt
    similarity index 78%
    rename from checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AnalyticsEventApi.kt
    rename to components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsEventApi.kt
    index 8a98d58f6..d3775c469 100644
    --- a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AnalyticsEventApi.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsEventApi.kt
    @@ -3,10 +3,10 @@
      *
      * This file is open source and available under the MIT license. See the LICENSE file for more info.
      *
    - * Created by oscars on 7/2/2024.
    + * Created by oscars on 12/2/2024.
      */
    
    -package com.adyen.checkout.core.internal.analytics
    +package com.adyen.checkout.components.core.internal.analytics
    
     import androidx.annotation.RestrictTo
    
    diff --git a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AnalyticsEvents.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsEvents.kt
    similarity index 96%
    rename from checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AnalyticsEvents.kt
    rename to components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsEvents.kt
    index 28027debc..d90089e3e 100644
    --- a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/AnalyticsEvents.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsEvents.kt
    @@ -6,7 +6,7 @@
      * Created by oscars on 7/2/2024.
      */
    
    -package com.adyen.checkout.core.internal.analytics
    +package com.adyen.checkout.components.core.internal.analytics
    
     import androidx.annotation.RestrictTo
     import java.util.Date
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsProvider.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsProvider.kt
    index fd6f27593..70a792048 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsProvider.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsProvider.kt
    @@ -21,7 +21,6 @@ import com.adyen.checkout.components.core.internal.ui.model.ComponentParams
     class AnalyticsProvider(
         val application: Application,
         val componentParams: ComponentParams,
    -    // drop-in or txVariant
         val source: AnalyticsSource,
         val sessionId: String?,
     ) {
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsSource.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsSource.kt
    index 4b4c58185..7938e93c7 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsSource.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsSource.kt
    @@ -12,11 +12,12 @@ import androidx.annotation.RestrictTo
    
     @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
     sealed class AnalyticsSource {
    -    data class DropIn(val paymentMethods: List<String>) : AnalyticsSource()
    +    data class DropIn(val paymentMethodList: List<String>) : AnalyticsSource()
         data class PaymentComponent(val paymentMethodType: String) : AnalyticsSource()
    
    +    // TODO: Check if we can rename paymentMethodList and not make it clash with this function
         fun getPaymentMethods(): List<String> = when(this) {
    -        is DropIn -> paymentMethods
    +        is DropIn -> paymentMethodList
             is PaymentComponent -> listOf(paymentMethodType)
         }
     }
    diff --git a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/GenericEvents.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/GenericEvents.kt
    similarity index 80%
    rename from checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/GenericEvents.kt
    rename to components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/GenericEvents.kt
    index f9e46dd02..b99a56ce0 100644
    --- a/checkout-core/src/main/java/com/adyen/checkout/core/internal/analytics/GenericEvents.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/GenericEvents.kt
    @@ -3,10 +3,10 @@
      *
      * This file is open source and available under the MIT license. See the LICENSE file for more info.
      *
    - * Created by oscars on 7/2/2024.
    + * Created by oscars on 12/2/2024.
      */
    
    -package com.adyen.checkout.core.internal.analytics
    +package com.adyen.checkout.components.core.internal.analytics
    
     import androidx.annotation.RestrictTo
    
    @@ -22,7 +22,7 @@ object GenericEvents {
             brand: String? = null,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.RENDERED,
    +        type = AnalyticsEvent.Info.Type.RENDERED,
             isStoredPaymentMethod = isStoredPaymentMethod,
             brand = brand,
         )
    @@ -32,7 +32,7 @@ object GenericEvents {
             target: String,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.DISPLAYED,
    +        type = AnalyticsEvent.Info.Type.DISPLAYED,
             target = target,
         )
    
    @@ -42,7 +42,7 @@ object GenericEvents {
             issuer: String,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.SELECTED,
    +        type = AnalyticsEvent.Info.Type.SELECTED,
             target = target,
             issuer = issuer,
         )
    @@ -52,7 +52,7 @@ object GenericEvents {
             target: String,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.INPUT,
    +        type = AnalyticsEvent.Info.Type.INPUT,
             target = target,
         )
    
    @@ -63,7 +63,7 @@ object GenericEvents {
             target: String,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.FOCUS,
    +        type = AnalyticsEvent.Info.Type.FOCUS,
             target = target,
         )
    
    @@ -72,7 +72,7 @@ object GenericEvents {
             target: String,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.UNFOCUS,
    +        type = AnalyticsEvent.Info.Type.UNFOCUS,
             target = target,
         )
    
    @@ -81,7 +81,7 @@ object GenericEvents {
             target: String,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.DOWNLOAD,
    +        type = AnalyticsEvent.Info.Type.DOWNLOAD,
             target = target,
         )
    
    @@ -92,7 +92,7 @@ object GenericEvents {
             validationErrorMessage: String?,
         ) = AnalyticsEvent.Info(
             component = component,
    -        type = InfoEventType.VALIDATION_ERROR,
    +        type = AnalyticsEvent.Info.Type.VALIDATION_ERROR,
             target = target,
             validationErrorCode = validationErrorCode,
             validationErrorMessage = validationErrorMessage,
    @@ -103,7 +103,7 @@ object GenericEvents {
             component: String,
         ) = AnalyticsEvent.Log(
             component = component,
    -        type = LogEventType.SUBMIT,
    +        type = AnalyticsEvent.Log.Type.SUBMIT,
         )
    
         fun threeDS2(
    @@ -111,7 +111,7 @@ object GenericEvents {
             message: String,
         ) = AnalyticsEvent.Log(
             component = component,
    -        type = LogEventType.THREEDS2,
    +        type = AnalyticsEvent.Log.Type.THREEDS2,
             message = message,
         )
    
    @@ -121,7 +121,7 @@ object GenericEvents {
             message: String,
         ) = AnalyticsEvent.Log(
             component = component,
    -        type = LogEventType.ACTION,
    +        type = AnalyticsEvent.Log.Type.ACTION,
             subType = subType,
             message = message,
         )
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsRepositoryData.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsRepositoryData.kt
    index 5d215f7ea..f5fea4d92 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsRepositoryData.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/AnalyticsRepositoryData.kt
    @@ -40,7 +40,7 @@ data class AnalyticsRepositoryData(
         ) : this(
             application = application,
             componentParams = componentParams,
    -        source = AnalyticsSource.PaymentComponent(componentParams.isCreatedByDropIn, paymentMethod),
    +        source = AnalyticsSource.PaymentComponent(paymentMethod.type.orEmpty()),
             paymentMethodType = paymentMethod.type,
             sessionId = sessionId,
         )
    @@ -53,7 +53,7 @@ data class AnalyticsRepositoryData(
         ) : this(
             application = application,
             componentParams = componentParams,
    -        source = AnalyticsSource.PaymentComponent(componentParams.isCreatedByDropIn, storedPaymentMethod),
    +        source = AnalyticsSource.PaymentComponent(storedPaymentMethod.type.orEmpty()),
             paymentMethodType = storedPaymentMethod.type,
             sessionId = sessionId,
         )
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/DefaultAnalyticsRepository.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/DefaultAnalyticsRepository.kt
    index b9557b82a..fbd5e7918 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/DefaultAnalyticsRepository.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/data/api/DefaultAnalyticsRepository.kt
    @@ -40,33 +40,33 @@ class DefaultAnalyticsRepository(
             state = State.InProgress
             adyenLog(AdyenLogLevel.VERBOSE) { "Setting up analytics" }
    
    -        runSuspendCatching {
    -            val analyticsSetupRequest = with(analyticsRepositoryData) {
    -                analyticsMapper.getAnalyticsSetupRequest(
    -                    packageName = packageName,
    -                    locale = locale,
    -                    source = source,
    -                    amount = amount,
    -                    screenWidth = screenWidth.toLong(),
    -                    paymentMethods = paymentMethods,
    -                    sessionId = sessionId,
    -                )
    -            }
    -            val response = analyticsService.setupAnalytics(analyticsSetupRequest, analyticsRepositoryData.clientKey)
    -            checkoutAttemptId = response.checkoutAttemptId
    -            state = State.Ready
    -            adyenLog(AdyenLogLevel.VERBOSE) { "Analytics setup call successful" }
    -        }.onFailure { e ->
    -            state = State.Failed
    -            adyenLog(AdyenLogLevel.ERROR) {
    -                "Failed to send analytics setup call - ${e::class.simpleName}: ${e.message}"
    -            }
    -        }
    +//        runSuspendCatching {
    +//            val analyticsSetupRequest = with(analyticsRepositoryData) {
    +//                analyticsMapper.getAnalyticsSetupRequest(
    +//                    packageName = packageName,
    +//                    locale = locale,
    +//                    source = source,
    +//                    amount = amount,
    +//                    screenWidth = screenWidth.toLong(),
    +//                    paymentMethods = paymentMethods,
    +//                    sessionId = sessionId,
    +//                )
    +//            }
    +//            val response = analyticsService.setupAnalytics(analyticsSetupRequest, analyticsRepositoryData.clientKey)
    +//            checkoutAttemptId = response.checkoutAttemptId
    +//            state = State.Ready
    +//            adyenLog(AdyenLogLevel.VERBOSE) { "Analytics setup call successful" }
    +//        }.onFailure { e ->
    +//            state = State.Failed
    +//            adyenLog(AdyenLogLevel.ERROR) {
    +//                "Failed to send analytics setup call - ${e::class.simpleName}: ${e.message}"
    +//            }
    +//        }
         }
    
         private fun canSendAnalytics(requiredLevel: AnalyticsParamsLevel): Boolean {
             require(requiredLevel != NONE) { "Analytics are not allowed with level NONE" }
    -        return !analyticsRepositoryData.level.hasHigherPriorityThan(requiredLevel)
    +        return true
         }
    
         companion object {
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt
    index c95ed163f..8214b77f5 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/ui/model/AnalyticsParams.kt
    @@ -15,20 +15,19 @@ import com.adyen.checkout.components.core.AnalyticsLevel
     @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
     data class AnalyticsParams(
         val level: AnalyticsParamsLevel,
    +    val clientKey: String,
     ) {
    
    -    constructor(analyticsConfiguration: AnalyticsConfiguration?) :
    -        this(level = getLevel(analyticsConfiguration))
    +    constructor(
    +        analyticsConfiguration: AnalyticsConfiguration?,
    +        clientKey: String,
    +    ) : this(level = getLevel(analyticsConfiguration), clientKey = clientKey)
     }
    
     @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    -enum class AnalyticsParamsLevel(private val priority: Int) {
    -    ALL(1),
    -    NONE(2);
    -
    -    internal fun hasHigherPriorityThan(level: AnalyticsParamsLevel): Boolean {
    -        return priority > level.priority
    -    }
    +enum class AnalyticsParamsLevel(val priority: Int) {
    +    NONE(1),
    +    ALL(2),
     }
    
     private fun getLevel(analyticsConfiguration: AnalyticsConfiguration?): AnalyticsParamsLevel {
    diff --git a/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/DropInViewModelFactory.kt b/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/DropInViewModelFactory.kt
    index f65293023..fd98091ce 100644
    --- a/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/DropInViewModelFactory.kt
    +++ b/drop-in/src/main/java/com/adyen/checkout/dropin/internal/ui/DropInViewModelFactory.kt
    @@ -13,6 +13,7 @@ import androidx.lifecycle.AbstractSavedStateViewModelFactory
     import androidx.lifecycle.SavedStateHandle
     import androidx.lifecycle.ViewModel
     import com.adyen.checkout.components.core.CheckoutConfiguration
    +import com.adyen.checkout.components.core.internal.analytics.AnalyticsSource
     import com.adyen.checkout.components.core.internal.data.api.AnalyticsMapper
     import com.adyen.checkout.components.core.internal.data.api.AnalyticsRepositoryData
     import com.adyen.checkout.components.core.internal.data.api.AnalyticsService
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    321a627 View commit details
    Browse the repository at this point in the history
  8. Implement AdyenAnalytics in MBWay

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    405d2cb View commit details
    Browse the repository at this point in the history
  9. Add backend objects for event tracking

    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    0d545ba View commit details
    Browse the repository at this point in the history
  10. Map events and send them to backend

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    2c236ec View commit details
    Browse the repository at this point in the history
  11. Setup interfaces for analytics architecture

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    9b49194 View commit details
    Browse the repository at this point in the history
  12. Implement fetch checkoutAttemptId flow

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    c725ba2 View commit details
    Browse the repository at this point in the history
  13. Implement send event flow

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    18358c2 View commit details
    Browse the repository at this point in the history
  14. Add local data store logic

    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    77716ee View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    d7c56a3 View commit details
    Browse the repository at this point in the history
  16. Implement timer and send logic

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ee1c2c8 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a9fa4f5 View commit details
    Browse the repository at this point in the history
  18. Rename and rearrange files

    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    68daa1c View commit details
    Browse the repository at this point in the history
  19. Create analytics manager factory and use it for MBWay component

    COAND-844
    
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManager.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManager.kt
    index 0249034da..40fdf0839 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManager.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManager.kt
    @@ -8,8 +8,8 @@
    
     package com.adyen.checkout.components.core.internal.analytics
    
    +import androidx.annotation.RestrictTo
     import com.adyen.checkout.components.core.internal.analytics.data.AnalyticsRepository
    -import com.adyen.checkout.components.core.internal.analytics.data.remote.AnalyticsSetupProvider
     import com.adyen.checkout.components.core.internal.ui.model.AnalyticsParams
     import com.adyen.checkout.components.core.internal.ui.model.AnalyticsParamsLevel
     import com.adyen.checkout.core.AdyenLogLevel
    @@ -24,9 +24,9 @@ import kotlinx.coroutines.isActive
     import kotlinx.coroutines.launch
     import kotlin.time.Duration.Companion.seconds
    
    +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
     class AnalyticsManager internal constructor(
         private val analyticsRepository: AnalyticsRepository,
    -    private val analyticsSetupProvider: AnalyticsSetupProvider,
         private val analyticsParams: AnalyticsParams,
         private val coroutineDispatcher: CoroutineDispatcher = Dispatchers.IO,
     ) {
    @@ -54,7 +54,7 @@ class AnalyticsManager internal constructor(
    
             coroutineScope.launch(coroutineDispatcher) {
                 runSuspendCatching {
    -                analyticsRepository.fetchCheckoutAttemptId(analyticsSetupProvider)
    +                analyticsRepository.fetchCheckoutAttemptId()
                 }.fold(
                     onSuccess = { attemptId ->
                         checkoutAttemptId = attemptId?.also { startTimer() }
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt
    new file mode 100644
    index 000000000..e02614591
    --- /dev/null
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/AnalyticsManagerFactory.kt
    @@ -0,0 +1,57 @@
    +/*
    + * Copyright (c) 2024 Adyen N.V.
    + *
    + * This file is open source and available under the MIT license. See the LICENSE file for more info.
    + *
    + * Created by ararat on 5/3/2024.
    + */
    +
    +package com.adyen.checkout.components.core.internal.analytics
    +
    +import android.app.Application
    +import androidx.annotation.RestrictTo
    +import com.adyen.checkout.components.core.internal.analytics.data.DefaultAnalyticsRepository
    +import com.adyen.checkout.components.core.internal.analytics.data.local.InfoAnalyticsLocalDataStore
    +import com.adyen.checkout.components.core.internal.analytics.data.local.LogAnalyticsLocalDataStore
    +import com.adyen.checkout.components.core.internal.analytics.data.remote.AnalyticsService
    +import com.adyen.checkout.components.core.internal.analytics.data.remote.AnalyticsTrackRequestProvider
    +import com.adyen.checkout.components.core.internal.analytics.data.remote.DefaultAnalyticsRemoteDataStore
    +import com.adyen.checkout.components.core.internal.analytics.data.remote.DefaultAnalyticsSetupProvider
    +import com.adyen.checkout.components.core.internal.ui.model.ComponentParams
    +import com.adyen.checkout.core.internal.data.api.HttpClientFactory
    +
    +@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    +class AnalyticsManagerFactory {
    +    fun provide(
    +        componentParams: ComponentParams,
    +        application: Application,
    +        source: AnalyticsSource,
    +        sessionId: String?
    +    ) = AnalyticsManager(
    +        analyticsRepository = DefaultAnalyticsRepository(
    +            localInfoDataStore = InfoAnalyticsLocalDataStore(),
    +            localLogDataStore = LogAnalyticsLocalDataStore(),
    +            remoteDataStore = DefaultAnalyticsRemoteDataStore(
    +                analyticsService = AnalyticsService(
    +                    HttpClientFactory.getAnalyticsHttpClient(componentParams.environment),
    +                ),
    +                clientKey = componentParams.clientKey,
    +                infoSize = INFO_SIZE,
    +                logSize = LOG_SIZE,
    +            ),
    +            analyticsSetupProvider = DefaultAnalyticsSetupProvider(
    +                application = application,
    +                componentParams = componentParams,
    +                source = source,
    +                sessionId = sessionId,
    +            ),
    +            analyticsTrackRequestProvider = AnalyticsTrackRequestProvider(),
    +        ),
    +        analyticsParams = componentParams.analyticsParams,
    +    )
    +
    +    companion object {
    +        private const val INFO_SIZE = 50
    +        private const val LOG_SIZE = 5
    +    }
    +}
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/AnalyticsRepository.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/AnalyticsRepository.kt
    index eb15dd775..e4fd2e09e 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/AnalyticsRepository.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/AnalyticsRepository.kt
    @@ -9,11 +9,10 @@
     package com.adyen.checkout.components.core.internal.analytics.data
    
     import com.adyen.checkout.components.core.internal.analytics.AnalyticsEvent
    -import com.adyen.checkout.components.core.internal.analytics.data.remote.AnalyticsSetupProvider
    
     internal interface AnalyticsRepository {
    
    -    suspend fun fetchCheckoutAttemptId(analyticsSetupProvider: AnalyticsSetupProvider): String?
    +    suspend fun fetchCheckoutAttemptId(): String?
    
         suspend fun storeEvent(event: AnalyticsEvent)
    
    diff --git a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/DefaultAnalyticsRepository.kt b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/DefaultAnalyticsRepository.kt
    index 6222b3899..1a372c3d4 100644
    --- a/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/DefaultAnalyticsRepository.kt
    +++ b/components-core/src/main/java/com/adyen/checkout/components/core/internal/analytics/data/DefaultAnalyticsRepository.kt
    @@ -18,10 +18,11 @@ internal class DefaultAnalyticsRepository(
         private val localInfoDataStore: AnalyticsLocalDataStore<AnalyticsEvent.Info>,
         private val localLogDataStore: AnalyticsLocalDataStore<AnalyticsEvent.Log>,
         private val remoteDataStore: AnalyticsRemoteDataStore,
    +    private val analyticsSetupProvider: AnalyticsSetupProvider,
         private val analyticsTrackRequestProvider: AnalyticsTrackRequestProvider,
     ) : AnalyticsRepository {
    
    -    override suspend fun fetchCheckoutAttemptId(analyticsSetupProvider: AnalyticsSetupProvider): String? {
    +    override suspend fun fetchCheckoutAttemptId(): String? {
             val request = analyticsSetupProvider.provide()
             return remoteDataStore.fetchCheckoutAttemptId(request).checkoutAttemptId
         }
    diff --git a/mbway/src/main/java/com/adyen/checkout/mbway/internal/provider/MBWayComponentProvider.kt b/mbway/src/main/java/com/adyen/checkout/mbway/internal/provider/MBWayComponentProvider.kt
    index bd8b0eb37..74688703c 100644
    --- a/mbway/src/main/java/com/adyen/checkout/mbway/internal/provider/MBWayComponentProvider.kt
    +++ b/mbway/src/main/java/com/adyen/checkout/mbway/internal/provider/MBWayComponentProvider.kt
    @@ -22,10 +22,9 @@ import com.adyen.checkout.components.core.Order
     import com.adyen.checkout.components.core.PaymentMethod
     import com.adyen.checkout.components.core.internal.DefaultComponentEventHandler
     import com.adyen.checkout.components.core.internal.PaymentObserverRepository
    -import com.adyen.checkout.components.core.internal.analytics.AnalyticsProvider
    +import com.adyen.checkout.components.core.internal.analytics.AnalyticsManager
    +import com.adyen.checkout.components.core.internal.analytics.AnalyticsManagerFactory
     import com.adyen.checkout.components.core.internal.analytics.AnalyticsSource
    -import com.adyen.checkout.components.core.internal.data.api.OldAnalyticsRepository
    -import com.adyen.checkout.components.core.internal.analytics.data.remote.AnalyticsService
     import com.adyen.checkout.components.core.internal.provider.PaymentComponentProvider
     import com.adyen.checkout.components.core.internal.ui.model.ButtonComponentParamsMapper
     import com.adyen.checkout.components.core.internal.ui.model.CommonComponentParamsMapper
    @@ -56,7 +55,7 @@ class MBWayComponentProvider
     @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
     constructor(
         private val dropInOverrideParams: DropInOverrideParams? = null,
    -    private val analyticsRepository: OldAnalyticsRepository? = null,
    +    private val analyticsManager: AnalyticsManager? = null,
         private val localeProvider: LocaleProvider = LocaleProvider(),
     ) :
         PaymentComponentProvider<
    @@ -99,18 +98,11 @@ constructor(
                     paymentMethod = paymentMethod,
                     order = order,
                     componentParams = componentParams,
    -                // TODO: Find out how to use analytics source with drop-in
    -                adyenAnalytics = AdyenAnalytics(
    -                    analyticsProvider = AnalyticsProvider(
    -                        application,
    -                        componentParams,
    -                        AnalyticsSource.PaymentComponent(paymentMethod.type.orEmpty()),
    -                        null,
    -                    ),
    -                    analyticsParams = componentParams.analyticsParams,
    -                    analyticsService = AnalyticsService(
    -                        HttpClientFactory.getAnalyticsHttpClient(componentParams.environment),
    -                    ),
    +                analyticsManager = analyticsManager ?: AnalyticsManagerFactory().provide(
    +                    componentParams = componentParams,
    +                    application = application,
    +                    source = AnalyticsSource.PaymentComponent(paymentMethod.type.orEmpty()),
    +                    sessionId = null,
                     ),
                     submitHandler = SubmitHandler(savedStateHandle),
                 )
    @@ -191,18 +183,11 @@ constructor(
                     paymentMethod = paymentMethod,
                     order = checkoutSession.order,
                     componentParams = componentParams,
    -                // TODO: Find out how to use analytics source with drop-in
    -                adyenAnalytics = AdyenAnalytics(
    -                    analyticsProvider = AnalyticsProvider(
    -                        application,
    -                        componentParams,
    -                        AnalyticsSource.PaymentComponent(paymentMethod.type.orEmpty()),
    -                        checkoutSession.sessionSetupResponse.id,
    -                    ),
    -                    analyticsParams = componentParams.analyticsParams,
    -                    analyticsService = AnalyticsService(
    -                        HttpClientFactory.getAnalyticsHttpClient(componentParams.environment),
    -                    ),
    +                analyticsManager = analyticsManager ?: AnalyticsManagerFactory().provide(
    +                    componentParams = componentParams,
    +                    application = application,
    +                    source = AnalyticsSource.PaymentComponent(paymentMethod.type.orEmpty()),
    +                    sessionId = checkoutSession.sessionSetupResponse.id,
                     ),
                     submitHandler = SubmitHandler(savedStateHandle),
                 )
    diff --git a/mbway/src/main/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegate.kt b/mbway/src/main/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegate.kt
    index cb9cc361e..fec5297ed 100644
    --- a/mbway/src/main/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegate.kt
    +++ b/mbway/src/main/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegate.kt
    @@ -16,6 +16,7 @@ import com.adyen.checkout.components.core.PaymentMethod
     import com.adyen.checkout.components.core.PaymentMethodTypes
     import com.adyen.checkout.components.core.internal.PaymentComponentEvent
     import com.adyen.checkout.components.core.internal.PaymentObserverRepository
    +import com.adyen.checkout.components.core.internal.analytics.AnalyticsManager
     import com.adyen.checkout.components.core.internal.ui.model.ButtonComponentParams
     import com.adyen.checkout.components.core.internal.util.CountryInfo
     import com.adyen.checkout.components.core.internal.util.CountryUtils
    @@ -40,7 +41,7 @@ internal class DefaultMBWayDelegate(
         private val paymentMethod: PaymentMethod,
         private val order: OrderRequest?,
         override val componentParams: ButtonComponentParams,
    -    private val adyenAnalytics: AdyenAnalytics,
    +    private val analyticsManager: AnalyticsManager,
         private val submitHandler: SubmitHandler<MBWayComponentState>,
     ) : MBWayDelegate {
    
    @@ -69,12 +70,12 @@ internal class DefaultMBWayDelegate(
    
         override fun initialize(coroutineScope: CoroutineScope) {
             submitHandler.initialize(coroutineScope, componentStateFlow)
    -        setupAnalytics()
    +        initializeAnalytics(coroutineScope)
         }
    
    -    private fun setupAnalytics() {
    -        adyenLog(AdyenLogLevel.VERBOSE) { "setupAnalytics" }
    -        adyenAnalytics.setup()
    +    private fun initializeAnalytics(coroutineScope: CoroutineScope) {
    +        adyenLog(AdyenLogLevel.VERBOSE) { "initializeAnalytics" }
    +        analyticsManager.initialize(coroutineScope)
         }
    
         override fun observe(
    @@ -132,7 +133,7 @@ internal class DefaultMBWayDelegate(
         ): MBWayComponentState {
             val paymentMethod = MBWayPaymentMethod(
                 type = MBWayPaymentMethod.PAYMENT_METHOD_TYPE,
    -            checkoutAttemptId = adyenAnalytics.checkoutAttemptId,
    +            checkoutAttemptId = analyticsManager.getCheckoutAttemptId(),
                 telephoneNumber = outputData.mobilePhoneNumberFieldState.value,
             )
    
    diff --git a/mbway/src/test/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegateTest.kt b/mbway/src/test/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegateTest.kt
    index 6055c03f0..5303293f3 100644
    --- a/mbway/src/test/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegateTest.kt
    +++ b/mbway/src/test/java/com/adyen/checkout/mbway/internal/ui/DefaultMBWayDelegateTest.kt
    @@ -14,7 +14,7 @@ import com.adyen.checkout.components.core.CheckoutConfiguration
     import com.adyen.checkout.components.core.OrderRequest
     import com.adyen.checkout.components.core.PaymentMethod
     import com.adyen.checkout.components.core.internal.PaymentObserverRepository
    -import com.adyen.checkout.components.core.internal.data.api.OldAnalyticsRepository
    +import com.adyen.checkout.components.core.internal.analytics.AnalyticsManager
     import com.adyen.checkout.components.core.internal.ui.model.ButtonComponentParamsMapper
     import com.adyen.checkout.components.core.internal.ui.model.CommonComponentParamsMapper
     import com.adyen.checkout.core.Environment
    @@ -41,6 +41,7 @@ import org.junit.jupiter.params.provider.Arguments.arguments
     import org.junit.jupiter.params.provider.MethodSource
     import org.mockito.Mock
     import org.mockito.junit.jupiter.MockitoExtension
    +import org.mockito.kotlin.any
     import org.mockito.kotlin.doReturn
     import org.mockito.kotlin.verify
     import org.mockito.kotlin.whenever
    @@ -49,7 +50,7 @@ import java.util.Locale
     @OptIn(ExperimentalCoroutinesApi::class)
     @ExtendWith(MockitoExtension::class)
     internal class DefaultMBWayDelegateTest(
    -    @mock private val analyticsRepository: OldAnalyticsRepository,
    +    @mock private val analyticsManager: AnalyticsManager,
         @mock private val submitHandler: SubmitHandler<MBWayComponentState>,
     ) {
    
    @@ -198,9 +199,9 @@ internal class DefaultMBWayDelegateTest(
         }
    
         @test
    -    fun `when delegate is initialized then analytics event is sent`() = runTest {
    +    fun `when delegate is initialized then analytics manager is initialized`() = runTest {
             delegate.initialize(CoroutineScope(UnconfinedTestDispatcher()))
    -        verify(analyticsRepository).setupAnalytics()
    +        verify(analyticsManager).initialize(any())
         }
    
         @nested
    @@ -261,7 +262,7 @@ internal class DefaultMBWayDelegateTest(
    
             @test
             fun `when component state is valid then PaymentMethodDetails should contain checkoutAttemptId`() = runTest {
    -            whenever(analyticsRepository.getCheckoutAttemptId()) doReturn TEST_CHECKOUT_ATTEMPT_ID
    +            whenever(analyticsManager.getCheckoutAttemptId()) doReturn TEST_CHECKOUT_ATTEMPT_ID
    
                 delegate.initialize(CoroutineScope(UnconfinedTestDispatcher()))
    
    @@ -289,7 +290,7 @@ internal class DefaultMBWayDelegateTest(
                 componentSessionParams = null,
                 componentConfiguration = configuration.getMBWayConfiguration(),
             ),
    -        analyticsRepository = analyticsRepository,
    +        analyticsManager = analyticsManager,
             submitHandler = submitHandler,
         )
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    7a5aea3 View commit details
    Browse the repository at this point in the history
  20. Resolve some warnings

    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d4b27ae View commit details
    Browse the repository at this point in the history
  21. Fix some TODOs

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    c2f10a3 View commit details
    Browse the repository at this point in the history
  22. Fix some build errors

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    6ded0f3 View commit details
    Browse the repository at this point in the history
  23. Rename old classes back to previous and prefix new classes

    This is only for review purposes and should be reverted later.
    
    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d16855d View commit details
    Browse the repository at this point in the history
  24. Fix unit tests and lint errors

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    85cc709 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    4d5c7cf View commit details
    Browse the repository at this point in the history
  26. Move AnalyticsService to it's original place

    This is for review purposes and should be reverted later.
    
    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    12d1451 View commit details
    Browse the repository at this point in the history
  27. Serialize AnalyticsTrackRequest correctly

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    45eac91 View commit details
    Browse the repository at this point in the history
  28. Generate id for analytics events

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    2093f4b View commit details
    Browse the repository at this point in the history
  29. Return an empty JSONObject when response is empty

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    b6aa7b9 View commit details
    Browse the repository at this point in the history
  30. Don't send events if there are none

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    cbd9820 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    33e0d53 View commit details
    Browse the repository at this point in the history
  32. Create an interface for AnalyticsManager

    This will help with testing later.
    
    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a7c7a61 View commit details
    Browse the repository at this point in the history
  33. Alignments with iOS

    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    e92ce9b View commit details
    Browse the repository at this point in the history
  34. Log when exiting a function early

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    45b9dd4 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    64ca151 View commit details
    Browse the repository at this point in the history
  36. Improve empty response handling

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4b64fce View commit details
    Browse the repository at this point in the history
  37. Change analytics implementation for StoredACHDirectDebitDelegate and …

    …DefaultACHDirectDebitDelegate
    
    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ab6291c View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    9e5f431 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    9b74556 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    e4e9b07 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    4bcb0b5 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    92c7201 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    72eadf1 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    d43f1cc View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    fc82ec6 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    c957a1c View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    3ae4e78 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    542088c View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    7448790 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    a4c1030 View commit details
    Browse the repository at this point in the history
  51. Change analytics implementation for DefaultCashAppPayDelegate and Sto…

    …redCashAppPayDelegate
    
    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    854d915 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    fc3cb07 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    069b828 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    ecb34c0 View commit details
    Browse the repository at this point in the history
  55. Remove old analytics files

    COAND-844
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4515330 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    824f7e5 View commit details
    Browse the repository at this point in the history
  57. Add tests for AnalyticsPlatformParams

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    877ab14 View commit details
    Browse the repository at this point in the history
  58. Add test for AnalyticsService

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    7c8e040 View commit details
    Browse the repository at this point in the history
  59. Add tests for AnalyticsSetupRequest

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f0286c3 View commit details
    Browse the repository at this point in the history
  60. Add tests for AnalyticsSetupResponse

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a864bf8 View commit details
    Browse the repository at this point in the history
  61. Add tests for AnalyticsTrackRequest

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    37769da View commit details
    Browse the repository at this point in the history
  62. Add tests for AnalyticsTrackInfo

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    0b6fd8c View commit details
    Browse the repository at this point in the history
  63. Add tests for AnalyticsTrackLog

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ba4b024 View commit details
    Browse the repository at this point in the history
  64. Add tests for AnalyticsTrackRequestProvider

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    b7bc69e View commit details
    Browse the repository at this point in the history
  65. Add tests for DefaultAnalyticsManager

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    99dc7dc View commit details
    Browse the repository at this point in the history
  66. Add tests for DefaultAnalyticsRepository

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ba6e1e9 View commit details
    Browse the repository at this point in the history
  67. Add tests for DefaultAnalyticsSetupProvider

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    8f760f8 View commit details
    Browse the repository at this point in the history
  68. Fix detekt issues

    COAND-844
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    4b2cb2f View commit details
    Browse the repository at this point in the history
  69. Create test implementation of AnalyticsManager

    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    d0a833e View commit details
    Browse the repository at this point in the history
  70. Implement MBWay analytics events

    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    2ce58c2 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    8ac73d7 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    c02b7f7 View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    74cad3d View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    373601c View commit details
    Browse the repository at this point in the history
  75. Clean up tests

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    9ceeb86 View commit details
    Browse the repository at this point in the history
  76. Track action event when action is handled

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    0e1a313 View commit details
    Browse the repository at this point in the history
  77. Pass analytics manager to GenericActionComponentProvider from payment…

    … method component providers
    
    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ba60c92 View commit details
    Browse the repository at this point in the history
  78. Configuration menu
    Copy the full SHA
    ac76eed View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    ea0380e View commit details
    Browse the repository at this point in the history
  80. Track action event for DefaultAwaitDelegate

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f33110b View commit details
    Browse the repository at this point in the history
  81. Track action event for DefaultQRCodeDelegate

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    64e6323 View commit details
    Browse the repository at this point in the history
  82. Configuration menu
    Copy the full SHA
    a43f96d View commit details
    Browse the repository at this point in the history
  83. Configuration menu
    Copy the full SHA
    3a74c80 View commit details
    Browse the repository at this point in the history
  84. Track action event for DefaultWeChatDelegate

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    b9caf54 View commit details
    Browse the repository at this point in the history
  85. Configuration menu
    Copy the full SHA
    e51e69f View commit details
    Browse the repository at this point in the history
  86. Track download event when qr code is downloaded

    COAND-845
    
    diff --git a/qr-code/src/main/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegate.kt b/qr-code/src/main/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegate.kt
    index d1efa7cbf..c58ab3a1b 100644
    --- a/qr-code/src/main/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegate.kt
    +++ b/qr-code/src/main/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegate.kt
    @@ -310,6 +310,12 @@ internal class DefaultQRCodeDelegate(
             val timestamp = DateUtils.formatDateToString(Calendar.getInstance())
             val imageName = String.format(IMAGE_NAME_FORMAT, paymentMethodType, timestamp)
    
    +        val event = GenericEvents.download(
    +            component = paymentMethodType,
    +            target = "qr_download_button"
    +        )
    +        analyticsManager?.trackEvent(event)
    +
             coroutineScope.launch {
                 imageSaver.saveImageFromUrl(
                     context = context,
    diff --git a/qr-code/src/test/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegateTest.kt b/qr-code/src/test/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegateTest.kt
    index ba3c19c97..aad9455b9 100644
    --- a/qr-code/src/test/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegateTest.kt
    +++ b/qr-code/src/test/java/com/adyen/checkout/qrcode/internal/ui/DefaultQRCodeDelegateTest.kt
    @@ -612,6 +612,27 @@ internal class DefaultQRCodeDelegateTest(
                 )
                 analyticsManager.assertLastEventEquals(expectedEvent)
             }
    +
    +        @test
    +        fun `when downloadQRImage is called, then download event is tracked`() {
    +            delegate.initialize(CoroutineScope(UnconfinedTestDispatcher()))
    +            delegate.handleAction(
    +                QrCodeAction(
    +                    paymentMethodType = TEST_PAYMENT_METHOD_TYPE,
    +                    qrCodeData = TEST_QR_CODE_DATA,
    +                    paymentData = TEST_PAYMENT_DATA,
    +                ),
    +                mock(),
    +            )
    +
    +            delegate.downloadQRImage(context)
    +
    +            val expectedEvent = GenericEvents.download(
    +                component = TEST_PAYMENT_METHOD_TYPE,
    +                target = "qr_download_button",
    +            )
    +            analyticsManager.assertLastEventEquals(expectedEvent)
    +        }
         }
    
         private fun createTestAction(
    @@ -650,5 +671,6 @@ internal class DefaultQRCodeDelegateTest(
             private const val TEST_PAYMENT_METHOD_TYPE = "TEST_PAYMENT_METHOD_TYPE"
             private const val TEST_ACTION_TYPE = "TEST_PAYMENT_METHOD_TYPE"
             private const val TEST_PAYMENT_DATA = "TEST_PAYMENT_DATA"
    +        private const val TEST_QR_CODE_DATA = "TEST_QR_CODE_DATA"
         }
     }
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    839feef View commit details
    Browse the repository at this point in the history
  87. Add assertHasEventEquals method in TestAnalyticsManager to test payme…

    …nt methods, which track more than one event when initializing.
    
    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a80bcce View commit details
    Browse the repository at this point in the history
  88. Track events before calling onSubmit for delegates which already trac…

    …k submit event.
    
    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    6079ffd View commit details
    Browse the repository at this point in the history
  89. Improve DefaultMBWayDelegateTest

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ec3e8c3 View commit details
    Browse the repository at this point in the history
  90. Configuration menu
    Copy the full SHA
    70b7795 View commit details
    Browse the repository at this point in the history
  91. Add generic events for StoredACHDirectDebitDelegate and DefaultACHDir…

    …ectDebitDelegate
    
    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    e592d09 View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    d902a7d View commit details
    Browse the repository at this point in the history
  93. Configuration menu
    Copy the full SHA
    94d02d9 View commit details
    Browse the repository at this point in the history
  94. Add generic events for DefaultBoletoDelegate

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    5b7a675 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    5af0572 View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    2b82e52 View commit details
    Browse the repository at this point in the history
  97. Configuration menu
    Copy the full SHA
    03c5d5f View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    0689b72 View commit details
    Browse the repository at this point in the history
  99. Configuration menu
    Copy the full SHA
    f7fc98e View commit details
    Browse the repository at this point in the history
  100. Configuration menu
    Copy the full SHA
    71438a4 View commit details
    Browse the repository at this point in the history
  101. Add generic events for DefaultSepaDelegate

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a40fb39 View commit details
    Browse the repository at this point in the history
  102. Add generic events for DefaultUPIDelegate

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a4428b8 View commit details
    Browse the repository at this point in the history
  103. Address CR comments

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    825e21e View commit details
    Browse the repository at this point in the history
  104. Add threeDS2 event tracking functions

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    eaa6807 View commit details
    Browse the repository at this point in the history
  105. Track events for threeDS2 flow

    COAND-845
    araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f51faa9 View commit details
    Browse the repository at this point in the history
  106. Clean up unused code and TODOs

    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    a6f005b View commit details
    Browse the repository at this point in the history
  107. Map result field for track events to response object

    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    ad9de18 View commit details
    Browse the repository at this point in the history
  108. Move log line for successfully sending events

    The line was logged even when no events were actually sent. Now it should only log
    when events are actually successfully sent.
    
    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    8e4e040 View commit details
    Browse the repository at this point in the history
  109. Only remove events that were successfully sent

    This will prevent an edge case where we would accidentally clear events that were not sent yet.
    
    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    b96c990 View commit details
    Browse the repository at this point in the history
  110. Always initialize analytics when drop in is created

    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    f0bb1d7 View commit details
    Browse the repository at this point in the history
  111. Track action event for DefaultTwintDelegate

    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    884b429 View commit details
    Browse the repository at this point in the history
  112. Make sure action event is tracked when handleAction is called

    initState can be called from other places, so it's not the right place to send the event.
    
    COAND-845
    OscarSpruit authored and araratthehero committed May 28, 2024
    Configuration menu
    Copy the full SHA
    6114555 View commit details
    Browse the repository at this point in the history
  113. Configuration menu
    Copy the full SHA
    c502daa View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Correctly restore state of redirect

    COAND-857
    OscarSpruit committed May 29, 2024
    Configuration menu
    Copy the full SHA
    c1d0f67 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1639 from Adyen/fix/redirect-state-restoration

    Correctly restore state of redirect
    OscarSpruit authored May 29, 2024
    Configuration menu
    Copy the full SHA
    078cea1 View commit details
    Browse the repository at this point in the history
  3. Correctly restore state of WeChatPay

    COAND-857
    OscarSpruit committed May 29, 2024
    Configuration menu
    Copy the full SHA
    7a8a716 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #1640 from Adyen/fix/wechatpay-state-restoration

    Correctly restore state of WeChatPay
    OscarSpruit authored May 29, 2024
    Configuration menu
    Copy the full SHA
    e45eea5 View commit details
    Browse the repository at this point in the history
  5. Remove storedEventCount counter, since it was not reliable due to con…

    …current operations
    
    COAND-845
    araratthehero committed May 29, 2024
    Configuration menu
    Copy the full SHA
    fa75c59 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #1641 from Adyen/feature/analytics_remove_non_reli…

    …able_counter
    
    Analytics - Remove stored event counter
    araratthehero authored May 29, 2024
    Configuration menu
    Copy the full SHA
    278991a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3082a7b View commit details
    Browse the repository at this point in the history
  8. Update release notes

    OscarSpruit committed May 29, 2024
    Configuration menu
    Copy the full SHA
    feb15cd View commit details
    Browse the repository at this point in the history
  9. Merge pull request #1638 from Adyen/release/5.4.0

    Prepare release 5.4.0
    OscarSpruit authored May 29, 2024
    Configuration menu
    Copy the full SHA
    5eb7626 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    20e77cc View commit details
    Browse the repository at this point in the history
  11. Merge pull request #1643 from Adyen/release-note-deps

    Add dependency updates to release notes
    OscarSpruit authored May 29, 2024
    Configuration menu
    Copy the full SHA
    c34cb2f View commit details
    Browse the repository at this point in the history