acceptsuiteservice/WebApp/assets/js/accept-suite/app.js
//To check if customer ID is passed by the user along with product type for Accept.js and Accept.js UI request URLs
To check if customer ID is passed by the user along with product type for Accept.js and Accept.js UI request URLs
To check if customer ID is passed by the user along with product type for Accept . js and Accept . js UI request URLs
function checkForInvalidProduct(pageurl) {
    if (pageurl.toLowerCase().indexOf('&customerid=') > 0 || pageurl === '') {
        elements = document.getElementsByClassName('productCont');
        Array.prototype.forEach.call(elements, function (element) {
            element.style.display = 'none';
        });
        document.getElementById('invalidPage').innerHTML = '';
        document.getElementById('invalidPage').innerHTML = 'Product Type not Found';
        document.getElementById('invalidProduct').style.display = 'block';
    } else {
        if (activeCont === 'acceptui') {
            document.getElementById('acceptui').style.display = 'block';
            acceptUI();
        } else {
            document.getElementById('acceptjs').style.display = 'block';
            document.getElementById('rdCard').click();
        }
    }
}
function checkForInvalidProduct ( pageurl ) { if ( pageurl . toLowerCase ( ) . indexOf ( '&customerid=' ) > 0 || pageurl === '' ) { elements = document . getElementsByClassName ( 'productCont' ) ; Array . prototype . forEach . call ( elements , function ( element ) { element . style . display = 'none' ; } ) ; document . getElementById ( 'invalidPage' ) . innerHTML = '' ; document . getElementById ( 'invalidPage' ) . innerHTML = 'Product Type not Found' ; document . getElementById ( 'invalidProduct' ) . style . display = 'block' ; } else { if ( activeCont === 'acceptui' ) { document . getElementById ( 'acceptui' ) . style . display = 'block' ; acceptUI ( ) ; } else { document . getElementById ( 'acceptjs' ) . style . display = 'block' ; document . getElementById ( 'rdCard' ) . click ( ) ; } } }
To check if customer ID is passed by the user along with product type for Accept.js and Accept.js UI request URLs
To check if customer ID is passed by the user along with product type for Accept . js and Accept . js UI request URLs
//Accept.js and Accept.js UI accepts only product type //If the user passes customer id to Accept.js or Accept.js UI product type, then user gets redirected to the error message section //The content of all the 4 product types is disabled on the page //Below code gets executed on invalid page request by the user //If the user selects Accept.js UI product type in the dashboard page //If the user selects Accept.js product type in the dashboard page //By default credit card radio button is selected for accept js