Skip to content

Commit

Permalink
Disable white-label for Netcetera release
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Solovev committed May 15, 2024
1 parent f8e93b0 commit 1702689
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
}

Expand Down
28 changes: 14 additions & 14 deletions OmiseSDK/Sources/OmiseAPI/SourceType/SourceType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1702689

Please sign in to comment.