Include the standard Accounting.php.inc file, then add this code to the script that does the upgrade
PHP:
<?php
function changepackage($host,$user,$accesshash,$usessl, $username,$package) {
$result = whmreq("/scripts2/upacct?user=${username}&pkg=${package}",$host,$user,$accesshash,$usessl);
if ($cpanelaccterr != "") { return; }
return $result;
}
?>
Now you will be able to use the fuction like this, similar to the way you use the creation function
changepackage("locahost", "reselleracct", "ik0832hhfh", 1, "someuser", "Platnum")