From 23fab5b0ace8653b4608c479480ad14f66ad483f Mon Sep 17 00:00:00 2001 From: Samer Alabi <141707240+samer-stripe@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:36:08 -0800 Subject: [PATCH] Fix event name for EPMs. (#9923) --- .../android/paymentsheet/analytics/PaymentSheetEvent.kt | 2 +- .../android/paymentsheet/analytics/PaymentSheetEventTest.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEvent.kt b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEvent.kt index ca8880adf8e..9952626bd52 100644 --- a/paymentsheet/src/main/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEvent.kt +++ b/paymentsheet/src/main/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEvent.kt @@ -476,8 +476,8 @@ internal sealed class PaymentSheetEvent : AnalyticsEvent { is PaymentSelection.Saved -> "savedpm" is PaymentSelection.Link, is PaymentSelection.New.LinkInline -> "link" + is PaymentSelection.ExternalPaymentMethod, is PaymentSelection.New -> "newpm" - is PaymentSelection.ExternalPaymentMethod -> "epm" null -> "unknown" } diff --git a/paymentsheet/src/test/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEventTest.kt b/paymentsheet/src/test/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEventTest.kt index 2360282fddd..8a71c534ecd 100644 --- a/paymentsheet/src/test/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEventTest.kt +++ b/paymentsheet/src/test/java/com/stripe/android/paymentsheet/analytics/PaymentSheetEventTest.kt @@ -707,7 +707,7 @@ class PaymentSheetEventTest { assertThat( newPMEvent.eventName ).isEqualTo( - "mc_complete_payment_epm_success" + "mc_complete_payment_newpm_success" ) assertThat( newPMEvent.params @@ -748,7 +748,7 @@ class PaymentSheetEventTest { assertThat( newPMEvent.eventName ).isEqualTo( - "mc_complete_payment_epm_failure" + "mc_complete_payment_newpm_failure" ) assertThat( newPMEvent.params