So how do I put the following instructions to action hooks in what format please
To integrate JAM with WHMCS, follow these instructions:
1. Open up your whmcs/includes/checkoutscript.php file for editing.
2. Near the bottom of the file, add the following lines:
// You got mail!
mail($emailto, $subject, $message, $headers);
$result=mysql_query("SELECT * FROM tblorders WHERE ordernum = '$ordernumber' LIMIT 1");
$row = mysql_fetch_array($result);
$amount = $row['amount'];
$JAMIntegrate = file_get_contents("http://www.domain.com/affiliates/sale.php?amount=".$amount."&trans_id=".$ordernumber."&custom_mid=".$_COOKIE['jrox']."");
?>
3. Make sure to point http://www.domain.com/affiliates to your JAM installation URL