Hello,
I still use version 4 of WHMCS and created hook called TicetOpen.
Here is my code:
<?php
function SendSMS_NewTicket($vars)
{
$userid = $vars['userid'];
$message = $vars['message'];
$priority = $vars['priority'];
$subject = $vars['subject'];
$username = '';
$lastname = $vars['lastname'];
$password = '';
$destination = '';
$source = 'Transfer';
$text = "$subject";
$content = 'action=sendsms'.
'&user='.rawurlencode($username).
'&password='.rawurlencode($password).
'&to='.rawurlencode($destination).
'&from='.rawurlencode($source).
'&text='.rawurlencode($text);
$smsglobal_response = file_get_contents('http://www.smsglobal.com.au/http-api.php?'.$content);
}
add_hook("TicketOpen",1,"SendSMS_NewTicket"," ");
?>
I want to receive SMS if customer created ticket, all goes good, but I can't get customer First and Last name. This should be easy to get in new versions, but I cannot do this in WHMCS 4. Can anybody suggest mysql query or any way to get Client full Name?
Thanks