-
Notifications
You must be signed in to change notification settings - Fork 65
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
Release 5.4.0 #1642
Commits on May 1, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0d69e5d - Browse repository at this point
Copy the full SHA 0d69e5dView commit details -
Merge pull request #1595 from Adyen/renovate/detekt_version
Update detekt_version to v1.23.6
Configuration menu - View commit details
-
Copy full SHA for 754283a - Browse repository at this point
Copy the full SHA 754283aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a85e1bb - Browse repository at this point
Copy the full SHA a85e1bbView commit details -
Merge pull request #1596 from Adyen/renovate/hilt_version
Update hilt_version to v2.51.1
Configuration menu - View commit details
-
Copy full SHA for c58a06e - Browse repository at this point
Copy the full SHA c58a06eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d94f9a - Browse repository at this point
Copy the full SHA 5d94f9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d63171 - Browse repository at this point
Copy the full SHA 0d63171View commit details -
Configuration menu - View commit details
-
Copy full SHA for 911e059 - Browse repository at this point
Copy the full SHA 911e059View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ebba5b - Browse repository at this point
Copy the full SHA 7ebba5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f378c2 - Browse repository at this point
Copy the full SHA 0f378c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a1eee7 - Browse repository at this point
Copy the full SHA 6a1eee7View commit details -
This will create a build cache that can be used by other branches. COAND-851
Configuration menu - View commit details
-
Copy full SHA for a6520fe - Browse repository at this point
Copy the full SHA a6520feView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9045c7 - Browse repository at this point
Copy the full SHA a9045c7View commit details -
Merge pull request #1561 from Adyen/setup-ui-testing
Setup UI testing
Configuration menu - View commit details
-
Copy full SHA for b937ea4 - Browse repository at this point
Copy the full SHA b937ea4View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 688e27e - Browse repository at this point
Copy the full SHA 688e27eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6320c6c - Browse repository at this point
Copy the full SHA 6320c6cView commit details -
Merge pull request #1592 from Adyen/fix/config-obfuscation
Fix crash caused by obfuscation of action configurations
Configuration menu - View commit details
-
Copy full SHA for c082d19 - Browse repository at this point
Copy the full SHA c082d19View commit details -
Configuration menu - View commit details
-
Copy full SHA for 126671d - Browse repository at this point
Copy the full SHA 126671dView commit details -
Merge pull request #1597 from Adyen/renovate/detekt_gradle_plugin_ver…
…sion Update plugin io.gitlab.arturbosch.detekt to v1.23.6
Configuration menu - View commit details
-
Copy full SHA for 9133947 - Browse repository at this point
Copy the full SHA 9133947View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d5ae5e - Browse repository at this point
Copy the full SHA 1d5ae5eView commit details -
Merge pull request #1602 from Adyen/renovate/mockito_kotlin_version
Update dependency org.mockito.kotlin:mockito-kotlin to v5.3.1
Configuration menu - View commit details
-
Copy full SHA for 3e31323 - Browse repository at this point
Copy the full SHA 3e31323View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c58cf6 - Browse repository at this point
Copy the full SHA 9c58cf6View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for f98d311 - Browse repository at this point
Copy the full SHA f98d311View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a026ba - Browse repository at this point
Copy the full SHA 8a026baView commit details -
Merge pull request #1606 from Adyen/renovate/retrofit2_version
Update retrofit2_version to v2.11.0
Configuration menu - View commit details
-
Copy full SHA for eafaff6 - Browse repository at this point
Copy the full SHA eafaff6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34007da - Browse repository at this point
Copy the full SHA 34007daView commit details
Commits on May 2, 2024
-
Merge pull request #1608 from Adyen/renovate/kotlin
Update dependency composeOptions to v1.5.12
Configuration menu - View commit details
-
Copy full SHA for 9079724 - Browse repository at this point
Copy the full SHA 9079724View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5118a22 - Browse repository at this point
Copy the full SHA 5118a22View commit details -
Merge pull request #1598 from Adyen/renovate/dokka_version
Update plugin org.jetbrains.dokka to v1.9.20
Configuration menu - View commit details
-
Copy full SHA for 45e2579 - Browse repository at this point
Copy the full SHA 45e2579View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ffd8aa - Browse repository at this point
Copy the full SHA 2ffd8aaView commit details -
Merge pull request #1609 from Adyen/renovate/compose_activity_version
Update dependency androidx.activity:activity-compose to v1.9.0
Configuration menu - View commit details
-
Copy full SHA for 60b4f8f - Browse repository at this point
Copy the full SHA 60b4f8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for fecfd4b - Browse repository at this point
Copy the full SHA fecfd4bView commit details -
Merge pull request #1600 from Adyen/renovate/compose_bom_version
Update dependency androidx.compose:compose-bom to v2024.04.01
Configuration menu - View commit details
-
Copy full SHA for 35c30ea - Browse repository at this point
Copy the full SHA 35c30eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e2fac7 - Browse repository at this point
Copy the full SHA 0e2fac7View commit details -
Merge pull request #1603 from Adyen/renovate/barista_version
Update dependency com.adevinta.android:barista to v4.3.0
Configuration menu - View commit details
-
Copy full SHA for 0af6d69 - Browse repository at this point
Copy the full SHA 0af6d69View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16101c0 - Browse repository at this point
Copy the full SHA 16101c0View commit details -
Merge pull request #1604 from Adyen/renovate/robolectric_version
Update dependency org.robolectric:robolectric to v4.12.1
Configuration menu - View commit details
-
Copy full SHA for 7abf96a - Browse repository at this point
Copy the full SHA 7abf96aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d1cdd8 - Browse repository at this point
Copy the full SHA 9d1cdd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b871773 - Browse repository at this point
Copy the full SHA b871773View commit details -
Merge pull request #1593 from Adyen/renovate/android_gradle_plugin_ve…
…rsion Update android_gradle_plugin_version to v8.3.2
Configuration menu - View commit details
-
Copy full SHA for 1c0efad - Browse repository at this point
Copy the full SHA 1c0efadView commit details -
Configuration menu - View commit details
-
Copy full SHA for f4423b6 - Browse repository at this point
Copy the full SHA f4423b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad599ea - Browse repository at this point
Copy the full SHA ad599eaView commit details -
Merge pull request #1611 from Adyen/refactor/improve-client-key-valid…
…ation Improve client key validation
Configuration menu - View commit details
-
Copy full SHA for a028156 - Browse repository at this point
Copy the full SHA a028156View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb4387f - Browse repository at this point
Copy the full SHA cb4387fView commit details
Commits on May 3, 2024
-
Merge pull request #1599 from Adyen/renovate/browser_version
Update dependency androidx.browser:browser to v1.8.0
Configuration menu - View commit details
-
Copy full SHA for 96bae64 - Browse repository at this point
Copy the full SHA 96bae64View commit details -
Configuration menu - View commit details
-
Copy full SHA for a05e8d2 - Browse repository at this point
Copy the full SHA a05e8d2View commit details -
Merge pull request #1601 from Adyen/renovate/gradle-8.x
Update dependency gradle to v8.7
Configuration menu - View commit details
-
Copy full SHA for 4f850d8 - Browse repository at this point
Copy the full SHA 4f850d8View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for e48dca4 - Browse repository at this point
Copy the full SHA e48dca4View commit details -
Remove no-daemon flag for CI builds
Gradle doesn't recommend this anymore.
Configuration menu - View commit details
-
Copy full SHA for 8ca97d3 - Browse repository at this point
Copy the full SHA 8ca97d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21ba8c7 - Browse repository at this point
Copy the full SHA 21ba8c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba91dd8 - Browse repository at this point
Copy the full SHA ba91dd8View commit details -
Merge pull request #1605 from Adyen/fix/sonar-build-time
Speed up sonar
Configuration menu - View commit details
-
Copy full SHA for d571501 - Browse repository at this point
Copy the full SHA d571501View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7374f46 - Browse repository at this point
Copy the full SHA 7374f46View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd776a3 - Browse repository at this point
Copy the full SHA dd776a3View commit details -
Merge pull request #1614 from Adyen/refactor/non-transitive-r
Migrate to non-transitive R classes
Configuration menu - View commit details
-
Copy full SHA for 0700f86 - Browse repository at this point
Copy the full SHA 0700f86View commit details
Commits on May 6, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9b95814 - Browse repository at this point
Copy the full SHA 9b95814View commit details -
Merge pull request #1621 from Adyen/revert-1601-renovate/gradle-8.x
Revert gradle to v8.6
Configuration menu - View commit details
-
Copy full SHA for 16cf8b3 - Browse repository at this point
Copy the full SHA 16cf8b3View commit details
Commits on May 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b171b87 - Browse repository at this point
Copy the full SHA b171b87View commit details
Commits on May 8, 2024
-
Merge pull request #1612 from Adyen/fix/submit-button
Display pay button in components if created by drop in
Configuration menu - View commit details
-
Copy full SHA for 2b76b40 - Browse repository at this point
Copy the full SHA 2b76b40View commit details
Commits on May 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for acf30fb - Browse repository at this point
Copy the full SHA acf30fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e4fe73 - Browse repository at this point
Copy the full SHA 2e4fe73View commit details
Commits on May 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 20a15ca - Browse repository at this point
Copy the full SHA 20a15caView commit details -
Configuration menu - View commit details
-
Copy full SHA for b1addd4 - Browse repository at this point
Copy the full SHA b1addd4View commit details -
Merge pull request #1625 from Adyen/renovate/adyen3ds2_version
Update dependency com.adyen.threeds:adyen-3ds2 to v2.2.18
Configuration menu - View commit details
-
Copy full SHA for d33ee95 - Browse repository at this point
Copy the full SHA d33ee95View commit details
Commits on May 14, 2024
-
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
Configuration menu - View commit details
-
Copy full SHA for 3cc0ae2 - Browse repository at this point
Copy the full SHA 3cc0ae2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f1473f - Browse repository at this point
Copy the full SHA 0f1473fView commit details -
Merge pull request #1629 from Adyen/fix/old-3ds2-flow-drop-in
Fix drop-in unable to handle 3DS2 on API v66 and below
Configuration menu - View commit details
-
Copy full SHA for 10cc7e4 - Browse repository at this point
Copy the full SHA 10cc7e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33616ee - Browse repository at this point
Copy the full SHA 33616eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 609fc37 - Browse repository at this point
Copy the full SHA 609fc37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d5b6af - Browse repository at this point
Copy the full SHA 5d5b6afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b348a9 - Browse repository at this point
Copy the full SHA 4b348a9View commit details
Commits on May 15, 2024
-
Merge pull request #1628 from Adyen/feature/custom-tabs-styling
Support changing the custom tabs toolbar and navigation colors
Configuration menu - View commit details
-
Copy full SHA for 6aa503b - Browse repository at this point
Copy the full SHA 6aa503bView commit details
Commits on May 16, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a687eaf - Browse repository at this point
Copy the full SHA a687eafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 46bdb44 - Browse repository at this point
Copy the full SHA 46bdb44View commit details -
Configuration menu - View commit details
-
Copy full SHA for 88cb37d - Browse repository at this point
Copy the full SHA 88cb37dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a850d0f - Browse repository at this point
Copy the full SHA a850d0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1bb2952 - Browse repository at this point
Copy the full SHA 1bb2952View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98cbf53 - Browse repository at this point
Copy the full SHA 98cbf53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d02cb7 - Browse repository at this point
Copy the full SHA 1d02cb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b792ed - Browse repository at this point
Copy the full SHA 5b792edView commit details -
Configuration menu - View commit details
-
Copy full SHA for eebda82 - Browse repository at this point
Copy the full SHA eebda82View commit details -
Configuration menu - View commit details
-
Copy full SHA for 215914f - Browse repository at this point
Copy the full SHA 215914fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 30dfdab - Browse repository at this point
Copy the full SHA 30dfdabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59ee90a - Browse repository at this point
Copy the full SHA 59ee90aView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 98236be - Browse repository at this point
Copy the full SHA 98236beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93c3900 - Browse repository at this point
Copy the full SHA 93c3900View commit details -
Split restoring qr and redirect action state restoration for DefaultQ…
…rCodeDelegate COAND-857
Configuration menu - View commit details
-
Copy full SHA for 616c080 - Browse repository at this point
Copy the full SHA 616c080View commit details -
Configuration menu - View commit details
-
Copy full SHA for 189e0e4 - Browse repository at this point
Copy the full SHA 189e0e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f197ee1 - Browse repository at this point
Copy the full SHA f197ee1View commit details -
Make naming consistent between action delegates
Not for 3ds2 and WeChat though, because they are too specific. COAND-857
Configuration menu - View commit details
-
Copy full SHA for ce91061 - Browse repository at this point
Copy the full SHA ce91061View commit details -
Merge pull request #1489 from Adyen/fix/restore-action-handling-state
Restore action handling state
Configuration menu - View commit details
-
Copy full SHA for 6edff78 - Browse repository at this point
Copy the full SHA 6edff78View commit details
Commits on May 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 62a1234 - Browse repository at this point
Copy the full SHA 62a1234View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 59bdcf1 - Browse repository at this point
Copy the full SHA 59bdcf1View commit details
Commits on May 22, 2024
-
Don't save authorization token anymore
The action is saved now, which holds the authorization token. COAND-857
Configuration menu - View commit details
-
Copy full SHA for 7442464 - Browse repository at this point
Copy the full SHA 7442464View commit details -
Merge pull request #1632 from Adyen/fix/restore-3ds2-state
Restore 3DS2 state after process death
Configuration menu - View commit details
-
Copy full SHA for 5c7bdaf - Browse repository at this point
Copy the full SHA 5c7bdafView commit details
Commits on May 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e72558b - Browse repository at this point
Copy the full SHA e72558bView commit details -
This makes sure sonar runs after the other tasks are completed
Configuration menu - View commit details
-
Copy full SHA for f770073 - Browse repository at this point
Copy the full SHA f770073View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0316c80 - Browse repository at this point
Copy the full SHA 0316c80View commit details -
Configuration menu - View commit details
-
Copy full SHA for f98fdbc - Browse repository at this point
Copy the full SHA f98fdbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 809c282 - Browse repository at this point
Copy the full SHA 809c282View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33898ef - Browse repository at this point
Copy the full SHA 33898efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 089ca02 - Browse repository at this point
Copy the full SHA 089ca02View commit details -
Configuration menu - View commit details
-
Copy full SHA for bacb2f3 - Browse repository at this point
Copy the full SHA bacb2f3View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 6a21b74 - Browse repository at this point
Copy the full SHA 6a21b74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7bb498b - Browse repository at this point
Copy the full SHA 7bb498bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6aeeeee - Browse repository at this point
Copy the full SHA 6aeeeeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00be242 - Browse repository at this point
Copy the full SHA 00be242View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64b006d - Browse repository at this point
Copy the full SHA 64b006dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0690fab - Browse repository at this point
Copy the full SHA 0690fabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3231108 - Browse repository at this point
Copy the full SHA 3231108View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a4e627 - Browse repository at this point
Copy the full SHA 6a4e627View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee174f3 - Browse repository at this point
Copy the full SHA ee174f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5dbf865 - Browse repository at this point
Copy the full SHA 5dbf865View commit details -
This makes it possible for us to handle the activity result stuff and makes the implementation for a merchant significantly easier. COAND-806
Configuration menu - View commit details
-
Copy full SHA for f8d3456 - Browse repository at this point
Copy the full SHA f8d3456View commit details -
Configuration menu - View commit details
-
Copy full SHA for d978fa8 - Browse repository at this point
Copy the full SHA d978fa8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7cf94a - Browse repository at this point
Copy the full SHA d7cf94aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89498c8 - Browse repository at this point
Copy the full SHA 89498c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02f6563 - Browse repository at this point
Copy the full SHA 02f6563View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1cdfec - Browse repository at this point
Copy the full SHA a1cdfecView commit details -
Update ActionHandlingMethod explanation
COAND-806 Co-authored-by: Ararat Mnatsakanyan <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f5430ea - Browse repository at this point
Copy the full SHA f5430eaView commit details
Commits on May 24, 2024
-
Merge pull request #1630 from Adyen/feature/twint_sdk
Integrate with Twint SDK
Configuration menu - View commit details
-
Copy full SHA for 990e808 - Browse repository at this point
Copy the full SHA 990e808View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b337d2 - Browse repository at this point
Copy the full SHA 0b337d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for de9b80b - Browse repository at this point
Copy the full SHA de9b80bView commit details -
Configuration menu - View commit details
-
Copy full SHA for adb0a52 - Browse repository at this point
Copy the full SHA adb0a52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c782ed - Browse repository at this point
Copy the full SHA 6c782edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9372060 - Browse repository at this point
Copy the full SHA 9372060View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fa5f62 - Browse repository at this point
Copy the full SHA 7fa5f62View commit details
Commits on May 28, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d17d0a3 - Browse repository at this point
Copy the full SHA d17d0a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83ee09e - Browse repository at this point
Copy the full SHA 83ee09eView commit details -
Merge pull request #1633 from Adyen/fix/country-drop-down
Change phone number country code picker
Configuration menu - View commit details
-
Copy full SHA for 0d77481 - Browse repository at this point
Copy the full SHA 0d77481View commit details -
Use getBooleanOrNull instead of optBoolean for enableStoreDetails and…
… showRemovePaymentMethodButton COAND-913
Configuration menu - View commit details
-
Copy full SHA for d1d9cb0 - Browse repository at this point
Copy the full SHA d1d9cb0View commit details -
Merge pull request #1637 from Adyen/fix/stored_payment_methods_remova…
…l_old_integration_fix Fix storedPaymentMethod removal for older integrations
Configuration menu - View commit details
-
Copy full SHA for 6947855 - Browse repository at this point
Copy the full SHA 6947855View commit details -
Configuration menu - View commit details
-
Copy full SHA for d852fcd - Browse repository at this point
Copy the full SHA d852fcdView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 321a627 - Browse repository at this point
Copy the full SHA 321a627View commit details -
Implement AdyenAnalytics in MBWay
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 405d2cb - Browse repository at this point
Copy the full SHA 405d2cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d545ba - Browse repository at this point
Copy the full SHA 0d545baView commit details -
Map events and send them to backend
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 2c236ec - Browse repository at this point
Copy the full SHA 2c236ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b49194 - Browse repository at this point
Copy the full SHA 9b49194View commit details -
Implement fetch checkoutAttemptId flow
COAND-844
Configuration menu - View commit details
-
Copy full SHA for c725ba2 - Browse repository at this point
Copy the full SHA c725ba2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18358c2 - Browse repository at this point
Copy the full SHA 18358c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77716ee - Browse repository at this point
Copy the full SHA 77716eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7c56a3 - Browse repository at this point
Copy the full SHA d7c56a3View commit details -
Implement timer and send logic
COAND-844
Configuration menu - View commit details
-
Copy full SHA for ee1c2c8 - Browse repository at this point
Copy the full SHA ee1c2c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9fa4f5 - Browse repository at this point
Copy the full SHA a9fa4f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 68daa1c - Browse repository at this point
Copy the full SHA 68daa1cView commit details -
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, )
Configuration menu - View commit details
-
Copy full SHA for 7a5aea3 - Browse repository at this point
Copy the full SHA 7a5aea3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4b27ae - Browse repository at this point
Copy the full SHA d4b27aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2f10a3 - Browse repository at this point
Copy the full SHA c2f10a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ded0f3 - Browse repository at this point
Copy the full SHA 6ded0f3View commit details -
Rename old classes back to previous and prefix new classes
This is only for review purposes and should be reverted later. COAND-844
Configuration menu - View commit details
-
Copy full SHA for d16855d - Browse repository at this point
Copy the full SHA d16855dView commit details -
Fix unit tests and lint errors
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 85cc709 - Browse repository at this point
Copy the full SHA 85cc709View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d5c7cf - Browse repository at this point
Copy the full SHA 4d5c7cfView commit details -
Move AnalyticsService to it's original place
This is for review purposes and should be reverted later. COAND-844
Configuration menu - View commit details
-
Copy full SHA for 12d1451 - Browse repository at this point
Copy the full SHA 12d1451View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45eac91 - Browse repository at this point
Copy the full SHA 45eac91View commit details -
Generate id for analytics events
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 2093f4b - Browse repository at this point
Copy the full SHA 2093f4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b6aa7b9 - Browse repository at this point
Copy the full SHA b6aa7b9View commit details -
Don't send events if there are none
COAND-844
Configuration menu - View commit details
-
Copy full SHA for cbd9820 - Browse repository at this point
Copy the full SHA cbd9820View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33e0d53 - Browse repository at this point
Copy the full SHA 33e0d53View commit details -
Create an interface for AnalyticsManager
This will help with testing later. COAND-844
Configuration menu - View commit details
-
Copy full SHA for a7c7a61 - Browse repository at this point
Copy the full SHA a7c7a61View commit details -
Configuration menu - View commit details
-
Copy full SHA for e92ce9b - Browse repository at this point
Copy the full SHA e92ce9bView commit details -
Log when exiting a function early
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 45b9dd4 - Browse repository at this point
Copy the full SHA 45b9dd4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 64ca151 - Browse repository at this point
Copy the full SHA 64ca151View commit details -
Improve empty response handling
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 4b64fce - Browse repository at this point
Copy the full SHA 4b64fceView commit details -
Change analytics implementation for StoredACHDirectDebitDelegate and …
…DefaultACHDirectDebitDelegate COAND-844
Configuration menu - View commit details
-
Copy full SHA for ab6291c - Browse repository at this point
Copy the full SHA ab6291cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e5f431 - Browse repository at this point
Copy the full SHA 9e5f431View commit details -
Change analytics implementation for DefaultCardDelegate and StoredCar…
…dDelegate COAND-844
Configuration menu - View commit details
-
Copy full SHA for 9b74556 - Browse repository at this point
Copy the full SHA 9b74556View commit details -
Change analytics implementation for DefaultBlikDelegate and StoredBli…
…kDelegate COAND-844
Configuration menu - View commit details
-
Copy full SHA for e4e9b07 - Browse repository at this point
Copy the full SHA e4e9b07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bcb0b5 - Browse repository at this point
Copy the full SHA 4bcb0b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92c7201 - Browse repository at this point
Copy the full SHA 92c7201View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72eadf1 - Browse repository at this point
Copy the full SHA 72eadf1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d43f1cc - Browse repository at this point
Copy the full SHA d43f1ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc82ec6 - Browse repository at this point
Copy the full SHA fc82ec6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c957a1c - Browse repository at this point
Copy the full SHA c957a1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ae4e78 - Browse repository at this point
Copy the full SHA 3ae4e78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 542088c - Browse repository at this point
Copy the full SHA 542088cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7448790 - Browse repository at this point
Copy the full SHA 7448790View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4c1030 - Browse repository at this point
Copy the full SHA a4c1030View commit details -
Change analytics implementation for DefaultCashAppPayDelegate and Sto…
…redCashAppPayDelegate COAND-844
Configuration menu - View commit details
-
Copy full SHA for 854d915 - Browse repository at this point
Copy the full SHA 854d915View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc3cb07 - Browse repository at this point
Copy the full SHA fc3cb07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 069b828 - Browse repository at this point
Copy the full SHA 069b828View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecb34c0 - Browse repository at this point
Copy the full SHA ecb34c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4515330 - Browse repository at this point
Copy the full SHA 4515330View commit details -
Configuration menu - View commit details
-
Copy full SHA for 824f7e5 - Browse repository at this point
Copy the full SHA 824f7e5View commit details -
Add tests for AnalyticsPlatformParams
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 877ab14 - Browse repository at this point
Copy the full SHA 877ab14View commit details -
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 7c8e040 - Browse repository at this point
Copy the full SHA 7c8e040View commit details -
Add tests for AnalyticsSetupRequest
COAND-844
Configuration menu - View commit details
-
Copy full SHA for f0286c3 - Browse repository at this point
Copy the full SHA f0286c3View commit details -
Add tests for AnalyticsSetupResponse
COAND-844
Configuration menu - View commit details
-
Copy full SHA for a864bf8 - Browse repository at this point
Copy the full SHA a864bf8View commit details -
Add tests for AnalyticsTrackRequest
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 37769da - Browse repository at this point
Copy the full SHA 37769daView commit details -
Add tests for AnalyticsTrackInfo
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 0b6fd8c - Browse repository at this point
Copy the full SHA 0b6fd8cView commit details -
Add tests for AnalyticsTrackLog
COAND-844
Configuration menu - View commit details
-
Copy full SHA for ba4b024 - Browse repository at this point
Copy the full SHA ba4b024View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7bc69e - Browse repository at this point
Copy the full SHA b7bc69eView commit details -
Add tests for DefaultAnalyticsManager
COAND-844
Configuration menu - View commit details
-
Copy full SHA for 99dc7dc - Browse repository at this point
Copy the full SHA 99dc7dcView commit details -
Add tests for DefaultAnalyticsRepository
COAND-844
Configuration menu - View commit details
-
Copy full SHA for ba6e1e9 - Browse repository at this point
Copy the full SHA ba6e1e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f760f8 - Browse repository at this point
Copy the full SHA 8f760f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b2cb2f - Browse repository at this point
Copy the full SHA 4b2cb2fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0a833e - Browse repository at this point
Copy the full SHA d0a833eView commit details -
Implement MBWay analytics events
COAND-845
Configuration menu - View commit details
-
Copy full SHA for 2ce58c2 - Browse repository at this point
Copy the full SHA 2ce58c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ac73d7 - Browse repository at this point
Copy the full SHA 8ac73d7View commit details -
Add rendered and submit events for DefaultCardDelegate and StoredCard…
…Delegate COAND-845
Configuration menu - View commit details
-
Copy full SHA for c02b7f7 - Browse repository at this point
Copy the full SHA c02b7f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74cad3d - Browse repository at this point
Copy the full SHA 74cad3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 373601c - Browse repository at this point
Copy the full SHA 373601cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ceeb86 - Browse repository at this point
Copy the full SHA 9ceeb86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e1a313 - Browse repository at this point
Copy the full SHA 0e1a313View commit details -
Pass analytics manager to GenericActionComponentProvider from payment…
… method component providers COAND-845
Configuration menu - View commit details
-
Copy full SHA for ba60c92 - Browse repository at this point
Copy the full SHA ba60c92View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac76eed - Browse repository at this point
Copy the full SHA ac76eedView commit details -
Configuration menu - View commit details
-
Copy full SHA for ea0380e - Browse repository at this point
Copy the full SHA ea0380eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f33110b - Browse repository at this point
Copy the full SHA f33110bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64e6323 - Browse repository at this point
Copy the full SHA 64e6323View commit details -
Configuration menu - View commit details
-
Copy full SHA for a43f96d - Browse repository at this point
Copy the full SHA a43f96dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a74c80 - Browse repository at this point
Copy the full SHA 3a74c80View commit details -
Configuration menu - View commit details
-
Copy full SHA for b9caf54 - Browse repository at this point
Copy the full SHA b9caf54View commit details -
Configuration menu - View commit details
-
Copy full SHA for e51e69f - Browse repository at this point
Copy the full SHA e51e69fView commit details -
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" } }
Configuration menu - View commit details
-
Copy full SHA for 839feef - Browse repository at this point
Copy the full SHA 839feefView commit details -
Add assertHasEventEquals method in TestAnalyticsManager to test payme…
…nt methods, which track more than one event when initializing. COAND-845
Configuration menu - View commit details
-
Copy full SHA for a80bcce - Browse repository at this point
Copy the full SHA a80bcceView commit details -
Track events before calling onSubmit for delegates which already trac…
…k submit event. COAND-845
Configuration menu - View commit details
-
Copy full SHA for 6079ffd - Browse repository at this point
Copy the full SHA 6079ffdView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec3e8c3 - Browse repository at this point
Copy the full SHA ec3e8c3View commit details -
Add generic events for StoredCashAppPayDelegate and DefaultCashAppPay…
…Delegate COAND-845
Configuration menu - View commit details
-
Copy full SHA for 70b7795 - Browse repository at this point
Copy the full SHA 70b7795View commit details -
Add generic events for StoredACHDirectDebitDelegate and DefaultACHDir…
…ectDebitDelegate COAND-845
Configuration menu - View commit details
-
Copy full SHA for e592d09 - Browse repository at this point
Copy the full SHA e592d09View commit details -
Configuration menu - View commit details
-
Copy full SHA for d902a7d - Browse repository at this point
Copy the full SHA d902a7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94d02d9 - Browse repository at this point
Copy the full SHA 94d02d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b7a675 - Browse repository at this point
Copy the full SHA 5b7a675View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5af0572 - Browse repository at this point
Copy the full SHA 5af0572View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b82e52 - Browse repository at this point
Copy the full SHA 2b82e52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03c5d5f - Browse repository at this point
Copy the full SHA 03c5d5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0689b72 - Browse repository at this point
Copy the full SHA 0689b72View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7fc98e - Browse repository at this point
Copy the full SHA f7fc98eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 71438a4 - Browse repository at this point
Copy the full SHA 71438a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for a40fb39 - Browse repository at this point
Copy the full SHA a40fb39View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4428b8 - Browse repository at this point
Copy the full SHA a4428b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 825e21e - Browse repository at this point
Copy the full SHA 825e21eView commit details -
Configuration menu - View commit details
-
Copy full SHA for eaa6807 - Browse repository at this point
Copy the full SHA eaa6807View commit details -
Configuration menu - View commit details
-
Copy full SHA for f51faa9 - Browse repository at this point
Copy the full SHA f51faa9View commit details -
Clean up unused code and TODOs
COAND-845
Configuration menu - View commit details
-
Copy full SHA for a6f005b - Browse repository at this point
Copy the full SHA a6f005bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad9de18 - Browse repository at this point
Copy the full SHA ad9de18View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 8e4e040 - Browse repository at this point
Copy the full SHA 8e4e040View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for b96c990 - Browse repository at this point
Copy the full SHA b96c990View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0bb1d7 - Browse repository at this point
Copy the full SHA f0bb1d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 884b429 - Browse repository at this point
Copy the full SHA 884b429View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 6114555 - Browse repository at this point
Copy the full SHA 6114555View commit details -
Configuration menu - View commit details
-
Copy full SHA for c502daa - Browse repository at this point
Copy the full SHA c502daaView commit details
Commits on May 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c1d0f67 - Browse repository at this point
Copy the full SHA c1d0f67View commit details -
Merge pull request #1639 from Adyen/fix/redirect-state-restoration
Correctly restore state of redirect
Configuration menu - View commit details
-
Copy full SHA for 078cea1 - Browse repository at this point
Copy the full SHA 078cea1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a8a716 - Browse repository at this point
Copy the full SHA 7a8a716View commit details -
Merge pull request #1640 from Adyen/fix/wechatpay-state-restoration
Correctly restore state of WeChatPay
Configuration menu - View commit details
-
Copy full SHA for e45eea5 - Browse repository at this point
Copy the full SHA e45eea5View commit details -
Remove storedEventCount counter, since it was not reliable due to con…
…current operations COAND-845
Configuration menu - View commit details
-
Copy full SHA for fa75c59 - Browse repository at this point
Copy the full SHA fa75c59View commit details -
Merge pull request #1641 from Adyen/feature/analytics_remove_non_reli…
…able_counter Analytics - Remove stored event counter
Configuration menu - View commit details
-
Copy full SHA for 278991a - Browse repository at this point
Copy the full SHA 278991aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3082a7b - Browse repository at this point
Copy the full SHA 3082a7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for feb15cd - Browse repository at this point
Copy the full SHA feb15cdView commit details -
Merge pull request #1638 from Adyen/release/5.4.0
Prepare release 5.4.0
Configuration menu - View commit details
-
Copy full SHA for 5eb7626 - Browse repository at this point
Copy the full SHA 5eb7626View commit details -
Configuration menu - View commit details
-
Copy full SHA for 20e77cc - Browse repository at this point
Copy the full SHA 20e77ccView commit details -
Merge pull request #1643 from Adyen/release-note-deps
Add dependency updates to release notes
Configuration menu - View commit details
-
Copy full SHA for c34cb2f - Browse repository at this point
Copy the full SHA c34cb2fView commit details