acceptsuiteservice/WebApp/assets/js/accept-suite/accept-hosted.js
//ValidateCustomer function validates the customer id which is declared in the URL
ValidateCustomer function validates the customer id which is declared in the URL
ValidateCustomer function validates the customer id which is declared in the URL
function validateCustomer(id) {
    var customerId,
        result = {};
    customerId = id;
    $.ajax({
        type: 'GET',
        url: globalVars.ValidateCustomerRequestUrl,
        data: {
            apiLoginId: globalVars.ApiLoginID,
            apiTransactionKey: globalVars.ApiTransactionKey,
            customerId: customerId
        },
        async: false,
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        success: function (data) {
            var valid;
            if (data.status) {
                valid = true;
            } else {
                valid = false;
            }
            result = {
                valid: valid,
                status: data.status,
                message: data.errorMessage
            };
        },
        error: function (textStatus) {
            result = {
                valid: false,
                status: false,
                message: textStatus
            };
        }
    });
    return result;
}
function validateCustomer ( id ) { var customerId , result = { } ; customerId = id ; $ . ajax ( { type : 'GET' , url : globalVars . ValidateCustomerRequestUrl , data : { apiLoginId : globalVars . ApiLoginID , apiTransactionKey : globalVars . ApiTransactionKey , customerId : customerId } , async : false , contentType : 'application/json; charset=utf-8' , dataType : 'json' , success : function ( data ) { var valid ; if ( data . status ) { valid = true ; } else { valid = false ; } result = { valid : valid , status : data . status , message : data . errorMessage } ; } , error : function ( textStatus ) { result = { valid : false , status : false , message : textStatus } ; } } ) ; return result ; }
ValidateCustomer function validates the customer id which is declared in the URL
ValidateCustomer function validates the customer id which is declared in the URL
//Below ajax call to API to validate the customer id //Value fetched from the constants.js file //Value fetched from the constants.js file //Value fetched from the constants.js file // if the customer id is valid