661
1 Replies
html
bootstrap4
bootstrap3
javascript
I wonder if you have a js script code that authenticates a card in test mode in boostrap .a card format validation and authentication that returns VALID
function testCreditCard() { myCardNo = document.getElementById('CardNumber').value; myCardType = document.getElementById('CardType').value; if (checkCreditCard(myCardNo, myCardType)) { alert("Credit card has a valid format") } else { alert(ccErrors[ccErrorNo]) }; } --------------------- The above is the JS code you need to paste on the file Following is the HTML you can use ----------------------- <table> <tbody> <tr> <td style="padding-right: 30px;">American Express</td> <td>3400 0000 0000 009</td> </tr> <tr> <td>Carte Blanche</td> <td>3000 0000 0000 04</td> </tr> <tr> <td>Discover</td> <td>6011 0000 0000 0004</td> </tr> <tr> <td>Diners Club</td> <td>3852 0000 0232 37</td> </tr> <tr> <td>enRoute</td> <td>2014 0000 0000 009</td> </tr> <tr> <td>JCB</td> <td>3530 111333300000</td> </tr> <tr> <td>MasterCard</td> <td>5500 0000 0000 0004</td> </tr> <tr> <td>Solo</td> <td>6334 0000 0000 0004</td> </tr> <tr> <td>Switch</td> <td>4903 0100 0000 0009</td> </tr> <tr> <td>Visa</td> <td>4111 1111 1111 1111</td> </tr> <tr> <td>Laser</td> <td>6304 1000 0000 0008</td> </tr> </tbody> </table> <hr /> Card Number: <select tabindex="11" id="CardType" style="margin-left: 10px;"> <option value="AmEx">American Express</option> <option value="CarteBlanche">Carte Blanche</option> <option value="DinersClub">Diners Club</option> <option value="Discover">Discover</option> <option value="EnRoute">enRoute</option> <option value="JCB">JCB</option> <option value="Maestro">Maestro</option> <option value="MasterCard">MasterCard</option> <option value="Solo">Solo</option> <option value="Switch">Switch</option> <option value="Visa">Visa</option> <option value="VisaElectron">Visa Electron</option> <option value="LaserCard">Laser</option> </select> <input type="text" id="CardNumber" maxlength="24" size="24" style="margin-left: 10px;"> <button id="mybutton" type="button" onclick="testCreditCard();" style="margin-left: 10px; color: #f00;">Check</button>