I can check first to determine if I have a valid payment card number by following the Luhn verification algorithm.
But then I need to determine if it is a credit card or a debit card for the next task. I understand that it depends on the first four characters, but I'm not sure about the exact range.
If someone can explain or provide a link that explains that it would be great. Thanks.
edits ...
In both of these stackoverflow links, I don't see the answer to the question. Therefore, this cannot be a duplicate for any of them.
In my case, he doesnβt read the card using a card reader and instead uses the card number, CVV and release date to receive the payment (user inserts these things).
Also βyesβ I can check to determine if it is a Visa, Master Card or American Express. But do not find if it is a Credit or Debit . (For example, if the card is a Visa card, then how do I know if a Visa card is a "credit card" or a "debit card." Exact question).
Jibw
source share