Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7c349e2
Support scheme selection default order
andrii-vysotskyi-cko Feb 23, 2026
82e3b21
Support eligibility restrictions
andrii-vysotskyi-cko Feb 23, 2026
6dd776b
Fix access level
andrii-vysotskyi-cko Feb 23, 2026
641685f
Support returning customer token when authorizing invoice
andrii-vysotskyi-cko Feb 23, 2026
831ea28
Add payment tokenization event
andrii-vysotskyi-cko Feb 24, 2026
fd9f2d4
Merge remote-tracking branch 'origin/master' into feat/dynamic-checko…
andrii-vysotskyi-cko Mar 10, 2026
fd66b04
Support hiding saved payment methods
andrii-vysotskyi-cko Mar 10, 2026
105ae2c
Emit redirect events
andrii-vysotskyi-cko Mar 10, 2026
7b80626
Invalidate invoice when redirect is attempted
andrii-vysotskyi-cko Mar 10, 2026
654ec9c
Improve card saving customization
andrii-vysotskyi-cko Mar 10, 2026
34c4a9b
Code styling improvements
andrii-vysotskyi-cko Mar 10, 2026
c4d491a
Support mandating payment method saving for DC
andrii-vysotskyi-cko Mar 10, 2026
f6e568f
Fix invoice invalidation with nAPMs
andrii-vysotskyi-cko Mar 11, 2026
4b3c3d0
Stop generating auto completion utils
andrii-vysotskyi-cko Mar 13, 2026
f299f41
Improve accessibility
andrii-vysotskyi-cko Mar 15, 2026
bc5395f
Support invoice authorization outcome
andrii-vysotskyi-cko Mar 16, 2026
29f1448
Respect authorization outcome
andrii-vysotskyi-cko Mar 16, 2026
23f0933
Fix accessibility label for settings button
andrii-vysotskyi-cko Mar 17, 2026
044a6c6
Support regular payments section title
andrii-vysotskyi-cko Mar 17, 2026
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.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ final class CardPaymentViewModel: ObservableObject {
private func setCardTokenizationItem() {
let configuration = POCardTokenizationConfiguration(
cardholderName: nil,
isSavingAllowed: true,
saving: .init(),
cancelButton: .init(icon: Image(systemName: "xmark"))
)
let cardTokenizationItem = CardPaymentViewModelState.CardTokenization(
Expand Down
284 changes: 0 additions & 284 deletions Sources/ProcessOut/Sources/Generated/Sourcery+Generated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,287 +83,3 @@ extension POInvoiceAuthorizationRequest {
case prefersEphemeralWebAuthenticationSession
}
}

// MARK: - AutoCompletion


extension POCardsService {

/// Allows to retrieve card issuer information based on IIN.
///
/// - Parameters:
/// - iin: Card issuer identification number. Length should be at least 6 otherwise error is thrown.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func issuerInformation(
iin: String,
completion: sending @escaping @isolated(any) (Result<POCardIssuerInformation, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await issuerInformation(iin: iin)
}
}

/// Tokenizes a card. You can use the card for a single payment by creating a card token with it. If you want
/// to use the card for multiple payments then you can use the card token to create a reusable customer token.
/// Note that once you have used the card token either for a payment or to create a customer token, the card
/// token becomes invalid and you cannot use it for any further actions.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func tokenize(
request: POCardTokenizationRequest,
completion: sending @escaping @isolated(any) (Result<POCard, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await tokenize(request: request)
}
}

/// Updates card information.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func updateCard(
request: POCardUpdateRequest,
completion: sending @escaping @isolated(any) (Result<POCard, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await updateCard(request: request)
}
}

/// Tokenize previously authorized payment.
@available(*, deprecated, message: "Use the async method instead.")
@MainActor
@preconcurrency
@discardableResult
public func tokenize(
request: POApplePayPaymentTokenizationRequest,
completion: sending @escaping @isolated(any) (Result<POCard, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await tokenize(request: request)
}
}

/// Authorize given payment request and tokenize it.
@available(*, deprecated, message: "Use the async method instead.")
@MainActor
@preconcurrency
@discardableResult
public func tokenize(
request: POApplePayTokenizationRequest,
delegate: POApplePayTokenizationDelegate?,
completion: sending @escaping @isolated(any) (Result<POCard, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await tokenize(request: request, delegate: delegate)
}
}

/// Authorize given payment request and tokenize it.
@available(*, deprecated, message: "Use the async method instead.")
@MainActor
@preconcurrency
@discardableResult
public func tokenize(
request: POApplePayTokenizationRequest,
completion: sending @escaping @isolated(any) (Result<POCard, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await tokenize(request: request)
}
}
}

extension POCustomerTokensService {

/// Creates customer token using given request.
@available(*, deprecated, message: "Use the async method instead.")
@_spi(PO)
@preconcurrency
@discardableResult
public func createCustomerToken(
request: POCreateCustomerTokenRequest,
completion: sending @escaping @isolated(any) (Result<POCustomerToken, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await createCustomerToken(request: request)
}
}

/// Assigns new source to existing customer token and optionally verifies it.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func assignCustomerToken(
request: POAssignCustomerTokenRequest,
threeDSService: PO3DS2Service,
completion: sending @escaping @isolated(any) (Result<POCustomerToken, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await assignCustomerToken(request: request, threeDSService: threeDSService)
}
}

/// Deletes customer token.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func deleteCustomerToken(
request: PODeleteCustomerTokenRequest,
completion: sending @escaping @isolated(any) (Result<Void, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await deleteCustomerToken(request: request)
}
}
}

extension POGatewayConfigurationsRepository {

/// Returns available gateway configurations.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func all(
request: POAllGatewayConfigurationsRequest,
completion: sending @escaping @isolated(any) (Result<POAllGatewayConfigurationsResponse, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await all(request: request)
}
}

/// Searches configuration with given request.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func find(
request: POFindGatewayConfigurationRequest,
completion: sending @escaping @isolated(any) (Result<POGatewayConfiguration, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await find(request: request)
}
}

/// Returns available gateway configurations.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func all(
completion: sending @escaping @isolated(any) (Result<POAllGatewayConfigurationsResponse, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await all()
}
}
}

extension POInvoicesService {

/// Creates invoice with given parameters.
@available(*, deprecated, message: "Use the async method instead.")
@_spi(PO)
@preconcurrency
@discardableResult
public func createInvoice(
request: POInvoiceCreationRequest,
completion: sending @escaping @isolated(any) (Result<POInvoice, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await createInvoice(request: request)
}
}

/// Invoice details.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func invoice(
request: POInvoiceRequest,
completion: sending @escaping @isolated(any) (Result<POInvoice, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await invoice(request: request)
}
}

/// Performs invoice authorization with given request.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func authorizeInvoice(
request: POInvoiceAuthorizationRequest,
threeDSService: PO3DS2Service,
completion: sending @escaping @isolated(any) (Result<Void, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await authorizeInvoice(request: request, threeDSService: threeDSService)
}
}

/// Requests information needed to continue existing payment or start new one.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func nativeAlternativePaymentMethodTransactionDetails(
request: PONativeAlternativePaymentMethodTransactionDetailsRequest,
completion: sending @escaping @isolated(any) (Result<PONativeAlternativePaymentMethodTransactionDetails, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await nativeAlternativePaymentMethodTransactionDetails(request: request)
}
}

/// Initiates native alternative payment with a given request.
///
/// Some Native APMs require further information to be collected back from the customer. You can inspect
/// `nativeApm` in response object to understand if additional data is required.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func initiatePayment(
request: PONativeAlternativePaymentMethodRequest,
completion: sending @escaping @isolated(any) (Result<PONativeAlternativePaymentMethodResponse, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await initiatePayment(request: request)
}
}

/// Captures native alternative payament.
@available(*, deprecated, message: "Use the async method instead.")
@preconcurrency
@discardableResult
public func captureNativeAlternativePayment(
request: PONativeAlternativePaymentCaptureRequest,
completion: sending @escaping @isolated(any) (Result<Void, POFailure>) -> Void
) -> POCancellable {
invoke(completion: completion) {
try await captureNativeAlternativePayment(request: request)
}
}
}

/// Invokes given completion with a result of async operation.
private func invoke<T>(
completion: sending @escaping @isolated(any) (Result<T, POFailure>) -> Void,
withResultOf operation: @escaping @MainActor () async throws -> T
) -> POCancellable {
Task { @MainActor in
do {
let returnValue = try await operation()
await completion(.success(returnValue))
} catch let failure as POFailure {
await completion(.failure(failure))
} catch {
let failure = POFailure(message: "Something went wrong.", code: .Mobile.internal, underlyingError: error)
await completion(.failure(failure))
}
}
}

Loading
Loading