Idealws
Retired Forum Member-
Posts
50 -
Joined
-
Last visited
About Idealws

Idealws's Achievements
Member (2/3)
0
Reputation
-
Hello, Here are a few bugs I have noticed since I have updated to v5.1.2. Hopefully this list will help get some fixes in the near future. 1. When using the 'Login as client' feature it does not log you in as client it simply sends you to the client area and logs you out as admin. Tested both in Chrome and FF. Only appears to log you out of the admin in Chrome. 2. The remember me appears to not work as I get logged out all the time when taking to long to answer support tickets. 3. I get an invalid token from time to time when answering support tickets. Very frustrating when you have a long ticket reply and this happens. Blows out everything you typed and you have to start over. 4. When adding a product then going to the links tab. There are 4 links types the first one Direct Shipping Cart Link does not work all the time. Sometimes it will send you to the default order page and not the actual product itself. 5. When changing the General Settings it will save fine the first save. However if you change something else and click save it will give you an Invalid Token error. You have to go to Setup -> General Settings again in order to make additional changes. These are all I could think of at the moment. I will update the thread as I come across others.
-
I have this same issue. Really sucks when you have a long response to a ticket and it gets erased. I have learned I have to copy the ticket text before submitting in case this happens which is pretty often.
-
I have not modified any of the departments in the DB. I edit everything through the WHMCS control panel. I have checked the admin is assigned and it is. This issue still remains on the left hand navigation column. There is a reason multiple people have posted they are having the same problem. I am using v5.0.3 and this issue still exists.
-
My suggestion would be to add the licensing checks into one of your include files possibly one with your functions in it that cannot be removed or it will break the system completely. Regards, Ray
-
No offense taken. A mod can remove the check_license function. It just appears there are not many people that know how to use it. I could have just posted the other code to give general direction however.
-
Unless your running an unsecure system or you divulge your $licensing_secret_key it doesn't matter one way or the other about the check_license function being posted. For $100 you can purchase the license add-on and view that same code yourself as an example. If someone with malicious intent wanted to code they would just spend the $100 and get it. But for those of you whom may be insecure I will remove it or at least Matt can or another mod if they deem it necessary I cannot edit the post any longer.
-
Here is the code I use for the licensing add-on. Most of it is from the example given when you buy the license add-on itself. I have also included how to test for additional add-ons for a license in the system. <?php include_once "../configs/config.inc.php"; $showcopy = 1; // Lets get the confirguration stuff here $dbconnect = mysql_connect($config['database']['host'], $config['database']['username'], $config['database']['password']); mysql_select_db($config['database']['name']); $confresults = mysql_query("SELECT * FROM ".$config['database']['tblconfig']); while($conf = mysql_fetch_array($confresults)) { $config['system'][$conf['option']] = stripslashes($conf['value']); } $licensekey = $config['system']['licensekey']; $trialaccount = ""; if(is_file('../key/key.php')) { include_once('../key/key.php'); } function check_license($licensekey,$localkey="") { $whmcsurl = "https://www.yourdomain.com/billing/"; # This need to be wherever you have WHMCS installed. $licensing_secret_key = "YOURUNIQUECODEHERE"; # Set to unique value of chars $checkdate = date("Ymd"); # Current date $localkeydays = 0; # How long the local key is valid for in between remote checks $allowcheckfaildays = 5; # How many days to allow after local key expiry before blocking access if connection cannot be made $localkeyvalid = false; if ($localkey) { $localkey = str_replace("\n",'',$localkey); # Remove the line breaks $localdata = substr($localkey,0,strlen($localkey)-32); # Extract License Data $md5hash = substr($localkey,strlen($localkey)-32); # Extract MD5 Hash if ($md5hash==md5($localdata.$licensing_secret_key)) { $localdata = strrev($localdata); # Reverse the string $md5hash = substr($localdata,0,32); # Extract MD5 Hash $localdata = substr($localdata,32); # Extract License Data $localdata = base64_decode($localdata); $localkeyresults = unserialize($localdata); $originalcheckdate = $localkeyresults["checkdate"]; if ($md5hash==md5($originalcheckdate.$licensing_secret_key)) { $localexpiry = date("Ymd",mktime(0,0,0,date("m"),date("d")-$localkeydays,date("Y"))); if ($originalcheckdate>$localexpiry) { $localkeyvalid = true; $results = $localkeyresults; $validdomains = explode(",",$results["validdomain"]); if (!in_array($_SERVER['SERVER_NAME'], $validdomains)) { $localkeyvalid = false; $localkeyresults["status"] = "Invalid"; $results = array(); } $validips = explode(",",$results["validip"]); if (!in_array($_SERVER['SERVER_ADDR'], $validips)) { $localkeyvalid = false; $localkeyresults["status"] = "Invalid"; $results = array(); } if ($results["validdirectory"]!=dirname(__FILE__)) { $localkeyvalid = false; $localkeyresults["status"] = "Invalid"; $results = array(); } } } } } if (!$localkeyvalid) { $postfields["licensekey"] = $licensekey; $postfields["domain"] = $_SERVER['SERVER_NAME']; $postfields["ip"] = $_SERVER['SERVER_ADDR']; $postfields["dir"] = dirname(__FILE__); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_URL, $whmcsurl."modules/servers/licensing/verify.php"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); if (!$data) { $localexpiry = date("Ymd",mktime(0,0,0,date("m"),date("d")-($localkeydays+$allowcheckfaildays),date("Y"))); if ($originalcheckdate>$localexpiry) { $results = $localkeyresults; } else { $results["status"] = "Remote Check Failed"; return $results; } } else { preg_match_all('/<(.*?)>([^<]+)<\/\\1>/i', $data, $matches); $results = array(); foreach ($matches[1] AS $k=>$v) { $results[$v] = $matches[2][$k]; } } if ($results["status"]=="Active") { $results["checkdate"] = $checkdate; $data_encoded = serialize($results); $data_encoded = base64_encode($data_encoded); $data_encoded = md5($checkdate.$licensing_secret_key).$data_encoded; $data_encoded = strrev($data_encoded); $data_encoded = $data_encoded.md5($data_encoded.$licensing_secret_key); $data_encoded = wordwrap($data_encoded,80,"\n",true); $results["localkey"] = $data_encoded; } $results["remotecheck"] = true; } unset($postfields,$data,$matches,$whmcsurl,$licensing_secret_key,$checkdate,$localkeydays,$allowcheckfaildays,$md5hash); return $results; } // Let's create a function that locks the system out // for trial accounts based off the trial days function check_trial($keydate,$expdays) { list($syear,$smon,$sday) = explode("-", $keydate); $start = gregoriantojd($smon, $sday, $syear); $end = gregoriantojd(date("m"),date("d"), date("Y")); $daysdiff = $end - $start; $daysleft = $expdays - $daysdiff; if($daysdiff > $expdays) { $expired = FALSE; return $expired; }else{ return $daysleft; } } function debug_array($dataarray) { echo "<div align='left'><pre>"; print_r($dataarray); echo "</pre></div>"; } function var_dump_to_string($var){ $output = "<pre>"; $output .= get_object_vars($var); $output .= "</pre>"; return $output; } # The call below actually performs the license check. You need to pass in the license key and the local key data $licresults = check_license($licensekey,$localkey); $privatelabelactive = ""; // Lets get any add-ons the customer may have added. $getaddons = explode('|',$licresults['addons']); // Lets check if the client has ordered any add-ons for this license for($s=0;$s<=count($getaddons);$s++) { $getoptions = explode(';', $getaddons[$s]); $chkopt = explode('=', $getoptions[0]); if($chkopt[1] == "VIN Decoding") { $vdactive = explode('=', $getoptions[2]); $vindecodesactive = $vdactive[1]; } if($chkopt[1] == "Vehicle Stats") { $statsactive = explode('=', $getoptions[2]); $vehiclestatsactive = $statsactive[1]; } if($chkopt[1] == "DMS Polling") { $dmsactive = explode('=', $getoptions[2]); $dmspollingactive = $dmsactive[1]; } if($chkopt[1] == "Private Label") { $plactive = explode('=', $getoptions[2]); $privatelabelactive = $plactive[1]; } } ?> That handles the licensing and will disable the system if you include it in the header of your product. Then to check the add-ons you simply do this in your product: <?php if($vindecodesactive == "Active") { echo "All is good let them use it"; }eslse{ echo "Show them an error"; } ?> Hope this helps get you moving in the right direction.
-
The ticket count is showing 0 when there are active tickets such as in the included screenshot. All Active Tickets stats 0 when there are some active tickets. And I am assigned to All departments. I'm using v5.0.3
-
NVM, it is showing in the list of downloads after order but is not downloadable until payment is made. Disregard the last message. Regards, Ray
-
Hello, We offer downloadable products after a purchase is made but have noticed in a recent order that the downloads become available whether they have paid for the download or not. How can we make it where the Invoice has to be PAID before the download is available? It seems pointless to offer downloadable products ONLY after purchase if they DO NOT have to PAY to get the download. We just end up with order details and provide a FREE product s it sites now. Any help would be greatly appreciated. Regards, Ray
-
Recurring Payments using Paypal Pro
Idealws replied to jordanrynard's question in Pre-Sales Questions
I have the samne issue. My clients put in the credit card details and would like automatic payments. We use PayPal Payments Pro. My question is: If a client enters all the credit card details when first ordering including there CSC number and WHMCS stores all this information. How come the PayPal Payments Pro module cannot capture payment again just like it did when they first signed up? All the information is there, it is nothing different at this point then as if they made the first payment viw the system. Regards, Ray -
V4 - How to change "Portal Home" & Add my own header to Portal theme
Idealws replied to fearz's topic in Developer Corner
Adding your logo is actually quite simple using the new portal template. Open the header.tpl file and find the following line: <div id="company_title">{$companyname}</div> Should be about line 13 replace with: <div id="company_title"><img src="templates/{$template}/images/logo.jpg" alt="{$LANG.globalsystemname}" border="0" class="absmiddle" /></div> Upload your logo.jpg file to the portal/images folder and your set to go. Hope this helps. Regards, Ray -
Overdue Invoices being sent that are marked paid
Idealws replied to stephboreldesign's topic in Using WHMCS
I am having the same issue with my install. Customers are getting notices even when the invoice is paid. Did you find a solution for this problem? Regards, Ray -
I posted a fix for the integration here: http://forum.whmcs.com/showthread.php?t=7413&highlight=JROX&page=2 JROX has a error in their integration code. Regards, Ray
