From b19bed9ad6ee3167811e20d46ca4ec9e3c71a331 Mon Sep 17 00:00:00 2001 From: Ararat Mnatsakanyan Date: Wed, 11 Dec 2024 16:27:42 +0100 Subject: [PATCH] Add message field for Twint error events COAND-1047 --- .../twint/action/internal/ui/DefaultTwintActionDelegate.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/twint-action/src/main/java/com/adyen/checkout/twint/action/internal/ui/DefaultTwintActionDelegate.kt b/twint-action/src/main/java/com/adyen/checkout/twint/action/internal/ui/DefaultTwintActionDelegate.kt index a23a0fe3e5..80ae486de5 100644 --- a/twint-action/src/main/java/com/adyen/checkout/twint/action/internal/ui/DefaultTwintActionDelegate.kt +++ b/twint-action/src/main/java/com/adyen/checkout/twint/action/internal/ui/DefaultTwintActionDelegate.kt @@ -164,12 +164,12 @@ internal class DefaultTwintActionDelegate( } TwintPayResult.TW_B_ERROR -> { - trackThirdPartyErrorEvent() + trackThirdPartyErrorEvent("Twint result is error") onError(ComponentException("Twint encountered an error.")) } TwintPayResult.TW_B_APP_NOT_INSTALLED -> { - trackThirdPartyErrorEvent() + trackThirdPartyErrorEvent("Twint app not installed") onError(ComponentException("Twint app not installed.")) } } @@ -223,10 +223,11 @@ internal class DefaultTwintActionDelegate( ) } - private fun trackThirdPartyErrorEvent() { + private fun trackThirdPartyErrorEvent(message: String) { val event = GenericEvents.error( component = action?.paymentMethodType.orEmpty(), event = ErrorEvent.THIRD_PARTY, + message = message ) analyticsManager?.trackEvent(event) }