-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into COIOS-802_identify_native_redirect_flow
- Loading branch information
Showing
26 changed files
with
737 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// Copyright (c) 2024 Adyen N.V. | ||
// | ||
// This file is open source and available under the MIT license. See the LICENSE file for more info. | ||
// | ||
|
||
import Foundation | ||
|
||
/// PayByBank US payment method. | ||
public struct PayByBankUSPaymentMethod: PaymentMethod { | ||
public let type: PaymentMethodType | ||
|
||
public var name: String | ||
|
||
public var merchantProvidedDisplayInformation: MerchantCustomDisplayInformation? | ||
|
||
@_spi(AdyenInternal) | ||
public static var logoNames: [String] { | ||
["US-1", "US-2", "US-3", "US-4"] | ||
} | ||
|
||
public func defaultDisplayInformation(using parameters: LocalizationParameters?) -> DisplayInformation { | ||
.init( | ||
title: name, | ||
subtitle: nil, | ||
logoName: type.rawValue, | ||
trailingInfo: .logos( | ||
named: Self.logoNames, | ||
trailingText: "+" | ||
), | ||
accessibilityLabel: name | ||
) | ||
} | ||
|
||
@_spi(AdyenInternal) | ||
public func buildComponent(using builder: PaymentComponentBuilder) -> PaymentComponent? { | ||
builder.build(paymentMethod: self) | ||
} | ||
|
||
private enum CodingKeys: String, CodingKey { | ||
case type | ||
case name | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
Adyen/Core/Payment Methods/StoredPayByBankUSPaymentMethod.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// Copyright (c) 2024 Adyen N.V. | ||
// | ||
// This file is open source and available under the MIT license. See the LICENSE file for more info. | ||
// | ||
|
||
import Foundation | ||
|
||
/// Stored PayByBank US payment method. | ||
public struct StoredPayByBankUSPaymentMethod: StoredPaymentMethod { | ||
|
||
public let type: PaymentMethodType | ||
|
||
public let name: String | ||
|
||
public let label: String? | ||
|
||
public var merchantProvidedDisplayInformation: MerchantCustomDisplayInformation? | ||
|
||
public let identifier: String | ||
|
||
public let supportedShopperInteractions: [ShopperInteraction] | ||
|
||
@_spi(AdyenInternal) | ||
public func buildComponent(using builder: PaymentComponentBuilder) -> PaymentComponent? { | ||
builder.build(paymentMethod: self) | ||
} | ||
|
||
@_spi(AdyenInternal) | ||
public func defaultDisplayInformation(using parameters: LocalizationParameters?) -> DisplayInformation { | ||
let title: String | ||
let subtitle: String? | ||
|
||
if let label { | ||
title = label | ||
subtitle = name | ||
} else { | ||
title = name | ||
subtitle = nil | ||
} | ||
|
||
return DisplayInformation(title: title, subtitle: subtitle, logoName: type.rawValue) | ||
} | ||
|
||
// MARK: - Decoding | ||
|
||
private enum CodingKeys: String, CodingKey { | ||
case type | ||
case name | ||
case label | ||
case identifier = "id" | ||
case supportedShopperInteractions | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.