File tree 3 files changed +9
-9
lines changed
UnitTests/CardPaymentsTests
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ public class CardClient: NSObject {
170
170
if let error = error {
171
171
switch error {
172
172
case ASWebAuthenticationSessionError . canceledLogin:
173
- self . notifyCheckoutCancelWithError ( with: CardClientError . canceled , completion: completion)
173
+ self . notifyCheckoutCancelWithError ( with: CardClientError . threeDSecureCanceled , completion: completion)
174
174
return
175
175
default :
176
176
self . notifyCheckoutFailure ( with: CardClientError . threeDSecureError ( error) , completion: completion)
@@ -206,7 +206,7 @@ public class CardClient: NSObject {
206
206
if let error = error {
207
207
switch error {
208
208
case ASWebAuthenticationSessionError . canceledLogin:
209
- self . notifyVaultCancelWithError ( with: CardClientError . canceled , completion: completion)
209
+ self . notifyVaultCancelWithError ( with: CardClientError . threeDSecureCanceled , completion: completion)
210
210
return
211
211
default :
212
212
self . notifyVaultFailure ( with: CardClientError . threeDSecureError ( error) , completion: completion)
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ enum CardClientError {
39
39
case malformedDeeplinkURLError
40
40
41
41
/// 10. Cancellation from 3DS verification
42
- case canceledError
42
+ case threeDSCancellationError
43
43
}
44
44
45
45
static let unknownError = CoreSDKError (
@@ -68,8 +68,8 @@ enum CardClientError {
68
68
errorDescription: " An invalid 3DS URL was returned. Contact developer.paypal.com/support. "
69
69
)
70
70
71
- static let canceled = CoreSDKError (
72
- code: Code . canceledError . rawValue,
71
+ static let threeDSecureCanceled = CoreSDKError (
72
+ code: Code . threeDSCancellationError . rawValue,
73
73
domain: domain,
74
74
errorDescription: " 3DS verification has been canceled by the user. "
75
75
)
Original file line number Diff line number Diff line change @@ -203,8 +203,8 @@ class CardClient_Tests: XCTestCase {
203
203
XCTAssertNil ( result)
204
204
if let error = error as? CoreSDKError {
205
205
XCTAssertEqual ( error. domain, CardClientError . domain)
206
- XCTAssertEqual ( error. code, CardClientError . Code. canceledError . rawValue)
207
- XCTAssertEqual ( error. localizedDescription, CardClientError . canceled . localizedDescription)
206
+ XCTAssertEqual ( error. code, CardClientError . Code. threeDSCancellationError . rawValue)
207
+ XCTAssertEqual ( error. localizedDescription, CardClientError . threeDSecureCanceled . localizedDescription)
208
208
} else {
209
209
XCTFail ( " Expected error to be of type CoreSDKError " )
210
210
}
@@ -361,8 +361,8 @@ class CardClient_Tests: XCTestCase {
361
361
XCTAssertNil ( result)
362
362
if let error = error as? CoreSDKError {
363
363
XCTAssertEqual ( error. domain, CardClientError . domain)
364
- XCTAssertEqual ( error. code, CardClientError . canceled . code)
365
- XCTAssertEqual ( error. localizedDescription, CardClientError . canceled . localizedDescription)
364
+ XCTAssertEqual ( error. code, CardClientError . threeDSecureCanceled . code)
365
+ XCTAssertEqual ( error. localizedDescription, CardClientError . threeDSecureCanceled . localizedDescription)
366
366
} else {
367
367
XCTFail ( " Expected error to be of type CoreSDKError " )
368
368
}
You can’t perform that action at this time.
0 commit comments