![]() ![]() ![]() test with these invalid credit card numbers:Ĭonst invalid1 = Ĭonst invalid2 = įor (let i = array. When customers save a credit card, the system uses the same tokenization method of storing the token in the UserPaymentProfile table. Thank you! // test with these valid credit card numbers:Ĭonst valid4 = Ĭonst valid5 = I commented out my logic/thinking (to the right) in hopes that you can help me keep my logic. That's all The results will be shown on your screen that will display the status of your card (valid or invalid). Next, tap on the 'Validate Card Number' button to initiate the process. It could be that just one little thing is off and my way of thinking is correct, or it could be that you just can’t do it at all for some unique reason… so if someone can point out why my “validateCred” function for this project is returning “false” EVERY single time I put in a different provided credit card number array (even the ones that are considered “valid” and should have the function returning “true”), and explain what I need to do to make it work without having to only use the solution code, I would really appreciate your explanation as to why it is wrong. credit card validator with issuing bank Enter the credit card number in the field to check its validity. But the way I did it is obviously wrong and I can’t figure out why. Enter the 'Credit Card Number' in the section provided for that purpose. I have looked at the solution code after trying out the credit card validator function by myself, and I see that the checking if the index is even or odd is a bit different on the solution, than the way I did it (the solution checks for odd numbers whereas I checked for even), and my way was actually from researching on Google how to check if the current index is even or odd (and actually the solution seems more confusing than the way my logic had thought up, and the only other difference is that the solution had put some of the math logic into a variable, whereas I put it all on one line, but I don’t think that matters). To use a credit card validator, perform the following steps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |