@@ -99,7 +99,7 @@ public class CardClient: NSObject {
99
99
/// if it fails, `CardResult will be `nil` and `error` will describe the failure
100
100
public func approveOrder( request: CardRequest , completion: @escaping ( CardResult ? , CoreSDKError ? ) -> Void ) {
101
101
analyticsService = AnalyticsService ( coreConfig: config, orderID: request. orderID)
102
- analyticsService? . sendEvent ( " card-payments:3ds :started " )
102
+ analyticsService? . sendEvent ( " card-payments:approve-order :started " )
103
103
Task {
104
104
do {
105
105
let result = try await checkoutOrdersAPI. confirmPaymentSource ( cardRequest: request)
@@ -113,19 +113,19 @@ public class CardClient: NSObject {
113
113
return
114
114
}
115
115
116
- analyticsService? . sendEvent ( " card-payments:3ds: confirm-payment-source:challenge-required " )
116
+ analyticsService? . sendEvent ( " card-payments:confirm-payment-source:challenge-required " )
117
117
startThreeDSecureChallenge ( url: url, orderId: result. id, completion: completion)
118
118
} else {
119
- analyticsService? . sendEvent ( " card-payments:3ds: confirm-payment-source:succeeded " )
119
+ analyticsService? . sendEvent ( " card-payments:confirm-payment-source:succeeded " )
120
120
121
121
let cardResult = CardResult ( orderID: result. id, status: result. status, didAttemptThreeDSecureAuthentication: false )
122
122
notifyCheckoutSuccess ( for: cardResult, completion: completion)
123
123
}
124
124
} catch let error as CoreSDKError {
125
- analyticsService? . sendEvent ( " card-payments:3ds: confirm-payment-source:failed " )
125
+ analyticsService? . sendEvent ( " card-payments:confirm-payment-source:failed " )
126
126
notifyCheckoutFailure ( with: error, completion: completion)
127
127
} catch {
128
- analyticsService? . sendEvent ( " card-payments:3ds: confirm-payment-source:failed " )
128
+ analyticsService? . sendEvent ( " card-payments:confirm-payment-source:failed " )
129
129
notifyCheckoutFailure ( with: CardError . unknownError, completion: completion)
130
130
}
131
131
}
@@ -225,17 +225,17 @@ public class CardClient: NSObject {
225
225
}
226
226
227
227
private func notifyCheckoutSuccess( for result: CardResult , completion: ( CardResult ? , CoreSDKError ? ) -> Void ) {
228
- analyticsService? . sendEvent ( " card-payments:3ds :succeeded " )
228
+ analyticsService? . sendEvent ( " card-payments:approve-order :succeeded " )
229
229
completion ( result, nil )
230
230
}
231
231
232
232
private func notifyCheckoutFailure( with error: CoreSDKError , completion: ( CardResult ? , CoreSDKError ? ) -> Void ) {
233
- analyticsService? . sendEvent ( " card-payments:3ds :failed " )
233
+ analyticsService? . sendEvent ( " card-payments:approve-order :failed " )
234
234
completion ( nil , error)
235
235
}
236
236
237
237
private func notifyCheckoutCancelWithError( with error: CoreSDKError , completion: ( CardResult ? , CoreSDKError ? ) -> Void ) {
238
- analyticsService? . sendEvent ( " card-payments:3ds :challenge:user-canceled " )
238
+ analyticsService? . sendEvent ( " card-payments:approve-order :challenge:user-canceled " )
239
239
completion ( nil , error)
240
240
}
241
241
0 commit comments