Skip to content

Commit

Permalink
Merge pull request yoomoney#51 in MI/yandex-checkout-payments-swift f…
Browse files Browse the repository at this point in the history
…rom ~TVERDOKHLEB/yandex-checkout-payments-swift:task/b2b/BIOS-1124 to feature/pay-by-linked-to-the-store-card

* commit '27c662d6fe187c3a287265f76042e022755a54df':
  [NO-TASK] Add support CustomizationSettings to BankCardRepeatModuleInputData
  • Loading branch information
AutoMergeBot authored and AutoMergeBot committed Aug 21, 2019
2 parents 0fa682b + 27c662d commit 92c3a20
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ final class BankCardRepeatPresenter {

extension BankCardRepeatPresenter: TokenizationViewOutput {
func setupView() {
view?.setCustomizationSettings(inputData.customizationSettings)
presentContract()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public struct BankCardRepeatModuleInputData {
/// Enable logging
let isLoggingEnabled: Bool

/// Settings to customize SDK interface.
let customizationSettings: CustomizationSettings

/// Creates instance of `BankCardRepeatModuleInputData`.
///
/// - Parameters:
Expand All @@ -32,6 +35,7 @@ public struct BankCardRepeatModuleInputData {
/// - amount: Amount of payment.
/// - testModeSettings: Test mode settings.
/// - isLoggingEnabled: Enable logging
/// - customizationSettings: Settings to customize SDK interface.
///
/// - Returns: Instance of `BankCardRepeatModuleInputData`.
public init(
Expand All @@ -41,7 +45,8 @@ public struct BankCardRepeatModuleInputData {
paymentMethodId: String,
amount: Amount,
testModeSettings: TestModeSettings? = nil,
isLoggingEnabled: Bool = false
isLoggingEnabled: Bool = false,
customizationSettings: CustomizationSettings = CustomizationSettings()
) {
self.clientApplicationKey = (clientApplicationKey + ":").base64Encoded()
self.shopName = shopName
Expand All @@ -50,5 +55,6 @@ public struct BankCardRepeatModuleInputData {
self.amount = amount
self.testModeSettings = testModeSettings
self.isLoggingEnabled = isLoggingEnabled
self.customizationSettings = customizationSettings
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ public enum TokenizationFlow {
/// Bank card, YandexMoney, Sberbank-Online, Apple Pay.
case tokenization(TokenizationModuleInputData)

/// Flow for tokenization saved payment methods by payment method id.
/// Flow for tokenization stored payment methods by payment method id.
case bankCardRepeat(BankCardRepeatModuleInputData)
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,21 @@ public struct TokenizationModuleInputData {
/// - customizationSettings: Settings to customize SDK interface.
///
/// - Returns: Instance of `TokenizationModuleInputData`.
public init(clientApplicationKey: String,
shopName: String,
purchaseDescription: String,
amount: Amount,
gatewayId: String? = nil,
tokenizationSettings: TokenizationSettings = TokenizationSettings(),
testModeSettings: TestModeSettings? = nil,
cardScanning: CardScanning? = nil,
applePayMerchantIdentifier: String? = nil,
returnUrl: String? = nil,
isLoggingEnabled: Bool = false,
userPhoneNumber: String? = nil,
customizationSettings: CustomizationSettings = CustomizationSettings()) {
public init(
clientApplicationKey: String,
shopName: String,
purchaseDescription: String,
amount: Amount,
gatewayId: String? = nil,
tokenizationSettings: TokenizationSettings = TokenizationSettings(),
testModeSettings: TestModeSettings? = nil,
cardScanning: CardScanning? = nil,
applePayMerchantIdentifier: String? = nil,
returnUrl: String? = nil,
isLoggingEnabled: Bool = false,
userPhoneNumber: String? = nil,
customizationSettings: CustomizationSettings = CustomizationSettings()
) {
self.clientApplicationKey = (clientApplicationKey + ":").base64Encoded()
self.shopName = shopName
self.purchaseDescription = purchaseDescription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ final class RootViewController: UIViewController {
// paymentMethodId: "24e4eca6-000f-5000-9000-10a7bb3cfdb2",
// amount: amount,
// testModeSettings: testSettings,
// isLoggingEnabled: true
// isLoggingEnabled: true,
// customizationSettings: CustomizationSettings(mainScheme: .blueRibbon)
// ))

let viewController = TokenizationAssembly.makeModule(
Expand Down

0 comments on commit 92c3a20

Please sign in to comment.