Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let package = Package(
.library(name: "ProcessOutNetcetera3DS", targets: ["ProcessOutNetcetera3DS"])
],
dependencies: [
.package(url: "https://github.com/checkout/checkout-3ds-sdk-ios", exact: "3.2.11"),
.package(url: "https://github.com/checkout/checkout-3ds-sdk-ios", exact: "3.3.3"),
.package(url: "https://github.com/swiftlang/swift-cmark", exact: "0.7.1"),
.package(url: "https://github.com/netceteragroup/ios-3ds-sdk-spm", exact: "2.6.00")
.package(url: "https://github.com/netceteragroup/ios-3ds-sdk-spm", exact: "2.7.00")
],
targets: [
.target(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import ThreeDS_SDK
import UIKit

extension Transaction {

Expand All @@ -17,15 +18,17 @@ extension Transaction {
let statusReceiver = BlockChallengeStatusReceiver { status in
continuation.resume(returning: status)
}
do {
try doChallenge(
challengeParameters: challengeParameters,
challengeStatusReceiver: statusReceiver,
timeOut: timeout,
inViewController: viewController
)
} catch {
continuation.resume(throwing: error)
Task {
do {
try await doChallenge(
challengeParameters: challengeParameters,
challengeStatusReceiver: statusReceiver,
timeOut: timeout,
inViewController: viewController
)
} catch {
continuation.resume(throwing: error)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ public actor PONetcetera3DS2Service: PO3DS2Service {
try await service.initialize(
try configurationParameters(with: configuration),
locale: self.configuration.locale?.identifier,
uiCustomizationMap: self.configuration.uiCustomizations
uiCustomization: self.configuration.uiCustomizationsV2
)
self.service = service
let transaction = try service.createTransaction(
let transaction = try await service.createTransaction(
directoryServerId: configuration.directoryServerId, messageVersion: configuration.messageVersion
)
self.transaction = transaction
Expand Down Expand Up @@ -116,12 +116,12 @@ public actor PONetcetera3DS2Service: PO3DS2Service {
await MainActor.run {
try? transaction.getProgressView().stop()
}
try? transaction.close()
try? await transaction.close()
self.transaction = nil
}
transactionId = nil
if let service {
try? service.cleanup()
try? await service.cleanup()
self.service = nil
}
deepLinkObservation = nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,29 @@ public struct PONetcetera3DS2ServiceConfiguration {
}

/// Creates configuration instance.
public init(
authenticationMode: AuthenticationMode = .compatibility,
locale: Locale? = nil,
uiCustomizations: [UiCustomization.UICustomizationType: UiCustomization]? = nil,
showsProgressView: Bool = true,
bridgingExtensionVersion: BridgingExtensionVersion? = nil,
returnUrl: URL? = nil,
challengeTimeout: TimeInterval = 5 * 60,
logLevel: LogLevel = .error
) {
self.authenticationMode = authenticationMode
self.locale = locale
self.uiCustomizationsV2 = uiCustomizations
self.showsProgressView = showsProgressView
self.bridgingExtensionVersion = bridgingExtensionVersion
self.returnUrl = returnUrl
self.challengeTimeout = challengeTimeout
self.logLevel = logLevel
}

/// Creates configuration instance.
@_disfavoredOverload
@available(*, deprecated, message: "Use init that accepts typed uiCustomizations instead.")
public init(
authenticationMode: AuthenticationMode = .compatibility,
locale: Locale? = nil,
Expand All @@ -40,7 +63,7 @@ public struct PONetcetera3DS2ServiceConfiguration {
) {
self.authenticationMode = authenticationMode
self.locale = locale
self.uiCustomizations = uiCustomizations
self.uiCustomizationsV2 = uiCustomizations.map(Self.uiCustomizationV2(from:))
self.showsProgressView = showsProgressView
self.bridgingExtensionVersion = bridgingExtensionVersion
self.returnUrl = returnUrl
Expand All @@ -57,7 +80,16 @@ public struct PONetcetera3DS2ServiceConfiguration {
/// UI configuration information that is used to specify the UI layout and theme. For example, font
/// style and font size. Use UICustomizationType raw values as String keys for the uiCustomizations
/// dictionary. Each key represents a UI customization for a particular iOS appearance.
public let uiCustomizations: [String: UiCustomization]?
@available(*, deprecated, message: "Use typed uiCustomizationsV2 instead.")
public var uiCustomizations: [String: UiCustomization]? {
uiCustomizationsV2.map { uiCustomizationsV2 in
Dictionary(uniqueKeysWithValues: uiCustomizationsV2.map { ($0.key.rawValue, $0.value) })
}
}

/// Typed UI configuration information that is used to specify the UI layout and theme.
/// For example, font style and font size.
public let uiCustomizationsV2: [UiCustomization.UICustomizationType: UiCustomization]?

/// Indicates whether progress view is going to be presented to user during authentication.
public let showsProgressView: Bool
Expand All @@ -80,4 +112,19 @@ public struct PONetcetera3DS2ServiceConfiguration {

/// Netcetera SDK log level. Defaults to `.error`.
public let logLevel: LogLevel

// MARK: - Private Methods

private static func uiCustomizationV2(
from customizations: [String: UiCustomization]
) -> [UiCustomization.UICustomizationType: UiCustomization] {
var customizationsV2: [UiCustomization.UICustomizationType: UiCustomization] = [:]
customizations.forEach { typeRawValue, customization in
guard let type = UiCustomization.UICustomizationType(rawValue: typeRawValue) else {
return
}
customizationsV2[type] = customization
}
return customizationsV2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import ProcessOut
import ThreeDS_SDK
import UIKit

/// A delegate that allows customization of the 3DS2 flow in `PONetcetera3DS2Service`.
public protocol PONetcetera3DS2ServiceDelegate: AnyObject, Sendable {
Expand Down
Binary file modified Vendor/ThreeDS_SDK.xcframework/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file not shown.
Loading
Loading