I'm building a system for a small bank for card issuance, what I need is how to make the system generate Card Number sequence (or PAN) based on a specific pattern. For example, First six digits of PAN are the bank BIN: 517070 The next two digits are product code: let's say 30 (Could be any number) the next two digits are branch code: let's say 01 the rest of the digits will be generated randomly (of course the last digit is a check digit)
My questions: is there an algorithm to help me implement these requirements in the system?
This website matches my requirements https://www.elfqrin.com/discard_credit_card_generator.php
Thank you