Jump to content

steven99

Level 2 Member
  • Content count

    325
  • Joined

  • Last visited

  • Days Won

    8

steven99 last won the day on March 12

steven99 had the most liked content!

Community Reputation

53 Excellent

2 Followers

About steven99

  • Rank
    Level 2 Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. steven99

    Create Product Bundles

    Do you have domain registration as one of the bundle items? If so, that appears to be causing the issue from my quick test. Remove the domain registration bundle item and set the settings for the domain within the hosting product's bundle item.
  2. steven99

    Addon config variables in a hook?

    Could use internal classes, which basically do the same thing as database calls. https://docs.whmcs.com/classes/7.6/WHMCS/Module/Addon/Setting.html
  3. Had not noticed that behavior. In the addticketreply API call, add in: "status" => $params['status']. See below for updated code of the above hook. You could also use "adminusername" and set that to a general admin / ticketbot admin though may still have to set status. <?php use WHMCS\Database\Capsule; add_hook('TicketStatusChange', 1, function($vars) { $Ticket = localAPI('GetTicket', array('ticketid'=>$vars['ticketid'])); if ($Ticket['result'] == "success") { // We got ticket, now get department for email to use for reply try { $Department = Capsule::table('tblticketdepartments')->where( array('id'=>$Ticket['deptid']))->first(); } catch (Exception $e) { // Failed to get department, should not happen but oh well return false; } if ($Department) { $Email = $Department->email; if ($vars['status'] == "In Progress") { $Message = "Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue."; } elseif ($vars['status'] == "On Hold") { $Message = "Hello, your ticket has been changed to ".$vars['status']." status."; } if (isset($Message) and $Message) { //We have a message, so add it as a reply $command = 'AddTicketReply'; $postData = array( 'ticketid' => $vars['ticketid'], 'message' => $Message, 'name'=>'TicketBot', 'email'=>$Email, 'useMarkdown' => true, 'status'=>$vars['status']); $results = localAPI($command, $postData); } // IF good message } // if department } // if get ticket was success });
  4. Hooks have a tendency to break without any indication like that. PHP error log may have shown that error also.
  5. steven99

    Attach documents to clients via API ?

    This has to be done via the database; $ClientFile = Capsule::table('tblclientsfiles') ->insert( array('userid'=>1, "title"=> "The great file", 'filename'=>"greatfile.doc", 'dateadded'=>date('Y-m-d')) ); Filename should be a file within the attachments directory. I also have heard that the filename needs to be prefixed with "file6DigitNumber" where "6DigitNumber" is a random number but I don't think that is 100% required.
  6. Odd, try this basic one that just logs to the module log (Utiltiles -> Log -> Module log -- enable logging if it says it is not ) . Again it should be going in to whmcs root -> includes -> hooks with name of "hook_ticketstatuchange.php" (or any other name as long as it ends in .php) Also, may have missed it but what version of WHMCS are you using? <?php add_hook('TicketStatusChange', 1, function($vars) { logModuleCall("hook", "TicketStatusChange", $vars , print_r($vars,true), "", array()); });
  7. I have tested the following hook and it works. <?php use WHMCS\Database\Capsule; add_hook('TicketStatusChange', 1, function($vars) { $Ticket = localAPI('GetTicket', array('ticketid'=>$vars['ticketid'])); if ($Ticket['result'] == "success") { // We got ticket, now get department for email to use for reply try { $Department = Capsule::table('tblticketdepartments')->where( array('id'=>$Ticket['deptid']))->first(); } catch (Exception $e) { // Failed to get department, should not happen but oh well return false; } if ($Department) { $Email = $Department->email; if ($vars['status'] == "In Progress") { $Message = "Hey there,<br><br>Your ticket has been assigned to one of our technical team members and is currently under review, they will reply back here shortly with an update or to request more information about your issue."; } elseif ($vars['status'] == "On Hold") { $Message = "Hello, your ticket has been changed to ".$vars['status']." status."; } if (isset($Message) and $Message) { //We have a message, so add it as a reply $command = 'AddTicketReply'; $postData = array( 'ticketid' => $vars['ticketid'], 'message' => $Message, 'name'=>'TicketBot', 'email'=>$Email, 'useMarkdown' => true, ); $results = localAPI($command, $postData); } // IF good message } // if department } // if get ticket was success });
  8. Ensure the package in WHM isn't going beyond your reseller's account limit. That has been the common issue lately .
  9. And just to confirm, you have uploaded that to whmcs_root/includes/hooks ?
  10. VestsaCP has its own module also I believe. Point is just find a control panel you like and see if they have a module for WHMCS of their own.
  11. steven99

    Not sending Overdue Reminders to clients

    Check PHP's settings via WHMCS admin -> Utilities -> System -> php info for openssl.cafile, openssl.capath, and curl.cainfo (though I think that isn't shown there) and make sure they are set to a valid path. PHP 7 by default verifies certificates and if PHP isn't set to use a trusted root certificate list, it will fail on connections. At least that is the case for curl connections. (Though I thought they added a system test for that) Beyond that, check at office 365 for any permissions required for specific IPs like @brian! had mentioned.
  12. steven99

    Paypal Failed payment

    Make sure you're providing the correct email in the paypal gateway settings and that email has been verified by paypal. Also, if you have multiple email addresses verified in paypal and you are using a secondary address, try the primary address to see if that helps. And lastly, verify your paypal account is a business account as a personal account may not work.
  13. What is the actual error in the oops error? If you enable WHMCS admin -> Setup menu -> General Settings -> Other tab -> Display Errors, it will show you the actual error. Finding out the actual error could help to determine what permission is needed for example.
  14. Correct on both . Domain registrations get set your default ones. Transfers do not change their nameservers and it is up to the client to do so.
  15. steven99

    Credits used in another app

    Well, the main question is when do you want the billing to happen? At the time of usage or on a recurring period? I ask because at the time of usage could mean potentially creating 1 invoice for every SMS sent unless they are sent in bulk at the same time without any options otherwise.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines