Skip to content

Commit

Permalink
Merge pull request #79 from xendit/jcb-test-card-number
Browse files Browse the repository at this point in the history
Added 333700 as JCB card checking
  • Loading branch information
duong-xendit authored May 27, 2024
2 parents 3c52441 + a19bba1 commit e27585c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Xendit/Utils/CreditCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class CreditCard {
if cardNumber.count > 4 {
let index = cardNumber.index(cardNumber.startIndex, offsetBy: 4)
let startingNumber = Int(cardNumber[..<index])!
return (startingNumber >= 3528 && startingNumber <= 3589) || cardNumber.hasPrefix("308800") || cardNumber.hasPrefix("333755")
return (startingNumber >= 3528 && startingNumber <= 3589) || cardNumber.hasPrefix("308800") || cardNumber.hasPrefix("333755") || cardNumber.hasPrefix("333700")
}
return false
}
Expand Down

0 comments on commit e27585c

Please sign in to comment.