deal order valid function

add cav.api.php file