HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/portal.wb-webdesign.com/public_html/assets/js/CreditCardValidation.js
jQuery(document).ready(function() {

    var cvvname = "";
    if (jQuery("#cccvv").length) {
        cvvname = "#cccvv";
    } else {
        cvvname = "#cardcvv";
    }

    function isAmex()
    {
        // Check if AMEX was selected from the dropdown.
        var cc = jQuery("#cctype").val();
        var ccInfo = jQuery("[name='ccinfo']:checked").val();
        if (cc.toLowerCase().indexOf("american express") !== -1) {
            return true;
        }
        if (typeof ccInfo != 'undefined') {
            return (ccInfo.toLowerCase() == 'useexisting');
        }
        return false;
    }

    function isCardTypeVisible()
    {
        return jQuery("#ccTypeButton:visible").length > 0;
    }

    jQuery(cvvname).focus(function() {
        if (isAmex() || !isCardTypeVisible()) {
            jQuery(cvvname).attr("maxlength", "4");
        } else {
            jQuery(cvvname).attr("maxlength", "3");
        }
    });

    jQuery("#cctype").change(function() {
        var cardcvv = jQuery(cvvname).val();
        if (!isAmex() && cardcvv.length > 3) {
            // Reset the CVV, since it's too long now.
            jQuery(cvvname).val("");
        } 
    });
});