thirdparty.php refact