Skip to content

Commit

Permalink
Sammy pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
KunJeongPark committed Feb 26, 2024
1 parent 3ab587a commit 3bcb8eb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Support VoiceOver by adding button accessibility labels
* Font typeface changed to "PayPalOpen" to meet brand guidelines
* CardPayments
* Add `cardDidCancelVault()` to `CardVaultDelegate`
* Add `cardDidCancelThreeDSecure()` to `CardVaultDelegate`
* Add `cardThreeDSecureWillLaunch()` to `CardVaultDelegate`
* Add `cardThreeDSecureDidFinish()` to `CardVaultDelegate`
* PayPalWebPayments
Expand Down
2 changes: 1 addition & 1 deletion Demo/Demo/ViewModels/CardVaultViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CardVaultViewModel: VaultViewModel, CardVaultDelegate {
setUpdateSetupTokenResult(vaultError: vaultError)
}

func cardDidCancelVault(_ cardClient: CardClient) {
func cardDidCancelThreeDSecure(_ cardClient: CardClient) {
DispatchQueue.main.async {
self.state.updateSetupTokenResponse = .idle
self.state.updateSetupToken = nil
Expand Down
2 changes: 1 addition & 1 deletion Sources/CardPayments/CardClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public class CardClient: NSObject {
}

private func notifyVaultCancellation() {
vaultDelegate?.cardDidCancelVault(self)
vaultDelegate?.cardDidCancelThreeDSecure(self)
}
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/CardPayments/CardVaultDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public protocol CardVaultDelegate: AnyObject {
/// - didFinishWithError: the error returned by the Card vault flow
func card(_ cardClient: CardClient, didFinishWithVaultError vaultError: CoreSDKError)

/// Notify that the Card vault flow has been cancelled
/// Notify that the ThreeDSecure has been cancelled
/// - Parameters:
/// - client: the CardClient associated with delegate
func cardDidCancelVault(_ cardClient: CardClient)
func cardDidCancelThreeDSecure(_ cardClient: CardClient)

/// Notify that the 3DS challenge will be launched
/// - Parameters:
Expand Down
3 changes: 1 addition & 2 deletions UnitTests/CardPaymentsTests/CardClient_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import AuthenticationServices
@testable import CardPayments
@testable import TestShared

// swiftlint:disable type_body_length
// swiftlint:disable file_length
// swiftlint:disable type_body_length file_length
class CardClient_Tests: XCTestCase {

// MARK: - Helper Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MockCardVaultDelegate: CardVaultDelegate {
failure?(cardClient, vaultError)
}

func cardDidCancelVault(_ cardClient: CardClient) {
func cardDidCancelThreeDSecure(_ cardClient: CardClient) {
cancel?(cardClient)
}

Expand Down

0 comments on commit 3bcb8eb

Please sign in to comment.