This is an example for one of events I have used in my own Snapin plugin for sending sms
class PluginSendsms extends SnapinPlugin
{
public $listeners = array(
array("Invoice-Create", "invoiceCreateCallback"),
array("Client-Update", "clientUpdateCallback"),
array("UserPackage-Activate", "userpackageActivateCallback"),
array("Account-Login", "useraccountloginCallback"),
array("Ticket-ReplyByAdmin", "ticketreplybyadminCallback"),
array("Order-NewPackage", "ordernewpackageCallback"),
array("Invoice-Paid", "invoicepaidCallback"),
array("System-ActionCalled", "systemcallback"),
array("Service-AutoSuspend-Suspend", "ServiceAutoSuspendSuspendCallback"),
array("Package-Update", "packageUpdateCallback")
);
/*
/*
/*
public function userpackageActivateCallback($e)
{
if (is_array($e)) {
$event = $e;
} else {
$event = $e->getParams();
}
CE_Lib::log(4, $event);
$package_id = $event['userPackageId'];
$userPackage = new UserPackage($package_id);
$userId = $userPackage->getCustomerId();
..............
}