diff --git a/OmiseSDK/Sources/OmiseAPI/JSON Models/Source/Source.Payment.Installment.swift b/OmiseSDK/Sources/OmiseAPI/JSON Models/Source/Source.Payment.Installment.swift index 367d69db..cedd0175 100644 --- a/OmiseSDK/Sources/OmiseAPI/JSON Models/Source/Source.Payment.Installment.swift +++ b/OmiseSDK/Sources/OmiseAPI/JSON Models/Source/Source.Payment.Installment.swift @@ -29,36 +29,36 @@ extension Source.Payment.Installment { switch sourceType { case .installmentBAY: return [ 3, 4, 6, 10 ] - case .installmentWhiteLabelBAY: - return [ 3, 4, 6, 9, 10 ] - case .installmentFirstChoice: - return [ 3, 4, 6, 10, 12, 18, 24, 36 ] - case .installmentWhiteLabelFirstChoice: - return [ 3, 4, 6, 9, 10, 12, 18, 24, 36 ] case .installmentBBL: return [ 4, 6, 8, 10 ] - case .installmentWhiteLabelBBL: - return [ 4, 6, 8, 10 ] + case .installmentFirstChoice: + return [ 3, 4, 6, 10, 12, 18, 24, 36 ] case .installmentMBB: return [ 6, 12, 18, 24 ] case .installmentKTC: return [ 3, 4, 5, 6, 7, 8, 9, 10 ] - case .installmentWhiteLabelKTC: - return [ 3, 4, 5, 6, 7, 8, 9, 10 ] case .installmentKBank: return [ 3, 4, 6, 10 ] - case .installmentWhiteLabelKBank: - return [ 3, 6, 10 ] case .installmentSCB: return [ 3, 4, 6, 9, 10 ] - case .installmentWhiteLabelSCB: - return [ 3, 4, 6, 9, 10 ] case .installmentTTB: return [ 3, 4, 6, 10, 12 ] - case .installmentWhiteLabelTTB: - return [ 4, 6, 10 ] case .installmentUOB: return [ 3, 4, 6, 10 ] +// case .installmentWhiteLabelBAY: +// return [ 3, 4, 6, 9, 10 ] +// case .installmentWhiteLabelFirstChoice: +// return [ 3, 4, 6, 9, 10, 12, 18, 24, 36 ] +// case .installmentWhiteLabelBBL: +// return [ 4, 6, 8, 10 ] +// case .installmentWhiteLabelKTC: +// return [ 3, 4, 5, 6, 7, 8, 9, 10 ] +// case .installmentWhiteLabelSCB: +// return [ 3, 4, 6, 9, 10 ] +// case .installmentWhiteLabelKBank: +// return [ 3, 6, 10 ] +// case .installmentWhiteLabelTTB: +// return [ 4, 6, 10 ] default: return [] } diff --git a/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType+Installments.swift b/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType+Installments.swift index 4c1598ab..84301096 100644 --- a/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType+Installments.swift +++ b/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType+Installments.swift @@ -17,13 +17,13 @@ extension SourceType { public static var whiteLabelInstallments: [SourceType] { [ - .installmentWhiteLabelKTC, - .installmentWhiteLabelKBank, - .installmentWhiteLabelSCB, - .installmentWhiteLabelBBL, - .installmentWhiteLabelBAY, - .installmentWhiteLabelFirstChoice, - .installmentWhiteLabelTTB +// .installmentWhiteLabelKTC, +// .installmentWhiteLabelKBank, +// .installmentWhiteLabelSCB, +// .installmentWhiteLabelBBL, +// .installmentWhiteLabelBAY, +// .installmentWhiteLabelFirstChoice, +// .installmentWhiteLabelTTB ] } diff --git a/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType.swift b/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType.swift index 3f043a5e..7b1b271d 100644 --- a/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType.swift +++ b/OmiseSDK/Sources/OmiseAPI/SourceType/SourceType.swift @@ -50,20 +50,20 @@ public enum SourceType: String, Codable, CaseIterable { case installmentTTB = "installment_ttb" /// United Overseas Bank (UOB) https://docs.opn.ooo/installment-payments case installmentUOB = "installment_uob" - /// Krungthai Card (KTC) https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelKTC = "installment_wlb_ktc" - /// Kasikorn Bank https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelKBank = "installment_wlb_kbank" - /// Siam Commercial Bank https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelSCB = "installment_wlb_scb" - /// Bangkok Bank https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelBBL = "installment_wlb_bbl" - /// Krungsri https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelBAY = "installment_wlb_bay" - /// Krungsri First Choice https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelFirstChoice = "installment_wlb_first_choice" - /// TMBThanachart Bank https://docs.opn.ooo/installment-white-label-payments - case installmentWhiteLabelTTB = "installment_wlb_ttb" +// /// Krungthai Card (KTC) https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelKTC = "installment_wlb_ktc" +// /// Kasikorn Bank https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelKBank = "installment_wlb_kbank" +// /// Siam Commercial Bank https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelSCB = "installment_wlb_scb" +// /// Bangkok Bank https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelBBL = "installment_wlb_bbl" +// /// Krungsri https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelBAY = "installment_wlb_bay" +// /// Krungsri First Choice https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelFirstChoice = "installment_wlb_first_choice" +// /// TMBThanachart Bank https://docs.opn.ooo/installment-white-label-payments +// case installmentWhiteLabelTTB = "installment_wlb_ttb" /// Bank of Ayudhya (Krungsri) https://docs.opn.ooo/internet-banking case internetBankingBAY = "internet_banking_bay" /// Bangkok Bank https://docs.opn.ooo/internet-banking diff --git a/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ChoosePaymentCoordinator.swift b/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ChoosePaymentCoordinator.swift index 28aaf377..efeda087 100644 --- a/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ChoosePaymentCoordinator.swift +++ b/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ChoosePaymentCoordinator.swift @@ -107,20 +107,20 @@ class ChoosePaymentCoordinator: NSObject, ViewAttachable { func createInstallmentController() -> SelectPaymentController { var sourceTypes = client.latestLoadedCapability?.availableSourceTypes(SourceType.installments) ?? [] - let filter: [SourceType: SourceType] = [ - .installmentWhiteLabelKTC: .installmentKTC, - .installmentWhiteLabelKBank: .installmentKBank, - .installmentWhiteLabelSCB: .installmentSCB, - .installmentWhiteLabelBBL: .installmentBBL, - .installmentWhiteLabelBAY: .installmentBAY, - .installmentWhiteLabelFirstChoice: .installmentFirstChoice, - .installmentWhiteLabelTTB: .installmentTTB - ] +// let filter: [SourceType: SourceType] = [ +// .installmentWhiteLabelKTC: .installmentKTC, +// .installmentWhiteLabelKBank: .installmentKBank, +// .installmentWhiteLabelSCB: .installmentSCB, +// .installmentWhiteLabelBBL: .installmentBBL, +// .installmentWhiteLabelBAY: .installmentBAY, +// .installmentWhiteLabelFirstChoice: .installmentFirstChoice, +// .installmentWhiteLabelTTB: .installmentTTB +// ] - for (keepingSourceType, removingSourceType) in filter - where sourceTypes.contains(keepingSourceType) { - sourceTypes.removeAll { $0 == removingSourceType } - } +// for (keepingSourceType, removingSourceType) in filter +// where sourceTypes.contains(keepingSourceType) { +// sourceTypes.removeAll { $0 == removingSourceType } +// } let viewModel = SelectSourceTypePaymentViewModel( title: PaymentMethod.installment.localizedTitle, diff --git a/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ViewPresentable/SourceType+ViewPresentable.swift b/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ViewPresentable/SourceType+ViewPresentable.swift index a839ba24..f8397bae 100644 --- a/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ViewPresentable/SourceType+ViewPresentable.swift +++ b/OmiseSDK/Sources/Views/Screens/Choose Payment Methods/ViewPresentable/SourceType+ViewPresentable.swift @@ -46,21 +46,21 @@ extension SourceType: ViewPresentable { return "Grab" case .grabPayRms: return "Grab" - case .installmentBAY, .installmentWhiteLabelBAY: + case .installmentBAY: // , .installmentWhiteLabelBAY: return "BAY" - case .installmentBBL, .installmentWhiteLabelBBL: + case .installmentBBL: // , .installmentWhiteLabelBBL: return "BBL" - case .installmentFirstChoice, .installmentWhiteLabelFirstChoice: + case .installmentFirstChoice: // , .installmentWhiteLabelFirstChoice: return "First Choice" - case .installmentKBank, .installmentWhiteLabelKBank: + case .installmentKBank: // , .installmentWhiteLabelKBank: return "KBANK" - case .installmentKTC, .installmentWhiteLabelKTC: + case .installmentKTC: // , .installmentWhiteLabelKTC: return "KTC" case .installmentMBB: return "FPX/maybank" - case .installmentSCB, .installmentWhiteLabelSCB: + case .installmentSCB: // , .installmentWhiteLabelSCB: return "SCB" - case .installmentTTB, .installmentWhiteLabelTTB: + case .installmentTTB: // , .installmentWhiteLabelTTB: return "ttb" case .installmentUOB: return "uob"