Skip to content

Commit

Permalink
Update TestCards.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-paystack authored Oct 8, 2024
1 parent 84eeb76 commit b354bd2
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Sources/PaystackUI/Charge/ChargeCard/TestMode/TestCards.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,20 @@ extension TestCard {
}
}

var expiryYear: String {
let nextYear = Calendar.current.component(.year, from: Date()) + 1
let lastTwoDigits = String(nextYear).suffix(2)
return "\(lastTwoDigits)"
}

var expiryYear: String {
var expiryMonth: String {
switch self {
case .success:
return "24"
return "08"
case .bankAuthentication:
return "24"
return "08"
case .declined:
return "24"
return "08"
}

var expiryYear: String {
let nextYear = Calendar.current.component(.year, from: Date()) + 1
let lastTwoDigits = String(nextYear).suffix(2)
return "\(lastTwoDigits)"
}

var cardType: CardType {
Expand Down

0 comments on commit b354bd2

Please sign in to comment.