Mod 10 Check Routine
Moderators: chulett, rschirm, roy
Mod 10 Check Routine
Does any one has mod 10 check routine to validate any number?
Re: Mod 10 Check Routine
What is the problem that you are facing?kool_cons wrote:Does any one has mod 10 check routine to validate any number?
What is your input?
What output do you expect?
gateleys
Try the logic-kool_cons wrote:I have to validate credit card number whether it is mod 10 or not. Example: 123466(input)
2*1+2+2*3+4+2*6+6
2+2+6+4+12+6
2+2+6+4+(1+2)+6=23/10..is not a valid mod 10 check. i should throw an error.
Code: Select all
If MOD(InputSum, 10) = 0 Then 'OK' Else 'Error'
gateleys
-
- Charter Member
- Posts: 299
- Joined: Wed Nov 13, 2002 5:38 pm
- Location: USA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
throbinson wrote:Please post a few of your Credit Card numbers from production with the Expiration dates and 4 digit verification codes from the back and I'll try them out. I'll have an answer for you in a couple of weeks. Ones with large limits would be prefereable for true stress testing.
Guys - be aware that a check digit verification is much more than a simple 'mod 10' on the base number. For example:
http://www.beachnet.com/~hstiles/cardtype.html
After applying the LUHN formula to the number, the answer must be a multiple of 10, that is a 'mod 10' of the result must be zero - not of the credit card number.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
throbinson wrote:Please post a few of your Credit Card numbers from production with the Expiration dates and 4 digit verification codes from the back and I'll try them out. I'll have an answer for you in a couple of weeks. Ones with large limits would be prefereable for true stress testing.
Fell off the chair on this one
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Well, since you are a charter member, here are my numbers:
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>