Jump to content

zamrg

Member
  • Posts

    11
  • Joined

  • Last visited

About zamrg

zamrg's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. I'd be interested in developing something like this, but unfortunately, can't seem to find any docs on the API. I've googled 'google apps reseller api' but can only find google group discussions stating it's not yet available.
  2. I haven't had a thorough look but my first impression is, it's client side, so any validation that's done in js can be skipped by someone wanting to pass malicious data. I haven't tried POSTING an invalid country directly to the registration handler but I'd guess that one of it's validation checks is that the 2 country char you send must be in a defined array of countries. Have you tried selecting a country that isn't in WHMCS but is in the javascript array?
  3. It might help creating a simple php script to debug this: The following should be created and run on the server so the whois originates from the server ip. $post_data = array( 'username' => 'your username', 'password' => 'your password', 'accesskey' => 'your access key if ip restriction isn\'t set', 'action' => 'domainwhois', 'domain' => 'domain.co.za' ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://url/to/whmcs/includes/api.php'); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = curl_exec($ch); preg_match('/^result=success;status=(available|unavailable);whois=(.*)$/i', $response, $matches); $status = $matches[1]; $whois_data = urldecode($matches[2]); echo 'STATUS: ' . $status . '<br /><br />'; echo 'WHOIS DATA:<br />'; echo $whois_data; I suspect you may be getting a 'Data mining count exceeded from IP Address XXX.XXX.XXX>XXX.' error, in which case, there's nothing you can really do. I just tried about 7 whois from my own IP and received this error, so it looks like there threshold is rather low.
  4. sure, have sent you my contact details. *edit*, can't PM you, so have sent an email
  5. This solution assumes that in the excel report from the bank, their is a reference which would allow you to identify the client. You'll need some form of reference so as to get his/her invoices and then mark them as paid. 1. convert xls to csv 2. create a simple form to upload the csv file and have php input and parse it. 3. iterate through each row in the csv 4. extract client id from row 5. call api -> getinvoices with clientid=(client id from row) and status='Unpaid' 6. If client only has a single monthly invoice and this debit order relates to one invoice, you can call api -> updateinvoice and mark it as paid. 7. If client receives multiple monthly invoices and the debit order covers all of them, you'll need to mark them as paid on a first in first out or line item basis, and confirm that the amount received actually covers all invoices, then mark each one as paid. *EDIT* When marking as paid, there may be other fields that you'll need to update. ie: datepaid.
  6. You'd be able to get a list of paid invoices via the API but as far as I know, it's not as simple to the pdf generated by WHMCS, unless you wouldn't mind re-creating the pdf with the data received from the API. I suppose it would be possible if you use curl (with session/cookies saved) to actually login to the admin backend. You could then init a curl request to HTTP GET dl.php?type=i&id=(insert invoice id here).
  7. I managed to solve it. I'm using the current function; which will safely convert key=value to an associative array whilst still keeping any ; within values intact. private function _parse_vars($str) { $results = array(); $segments = explode(';', $str); $last_key = ''; foreach ($segments as $segment) { if (preg_match('/^([a-z0-9_]+)=(.*)$/i', $segment, $matches)) { $last_key = $matches[1]; $results[$last_key] = $matches[2]; } else { $results[$last_key] .= ';' . $segment; } } return $results; }
  8. I've been struggling to parse a response like key1=value1;key2=value2;key3=value3, something like getclientsdetails and a few other functions spit out. It would normally be something as simple as a split but the fact that any one of these value's can contain a ; raises an issue.
  9. We have an internal support department called notifications where cron job reports for things like cPanel updates, softaculous updates, etc are sent on a daily basis. The assigned staff shouldn't receive notifications upon new tickets as they're generally just report messages and are only monitored reactively. Is it possible to disable notifications for a specific support department and for a specific member of staff?
  10. I've managed to solve it using the guide here -> http://kbeezie.com/view/php-self-path-nginx/ It was a matter of path_info and php_self being set incorrectly.
  11. I've just installed a copy of WHMCS with a trial license. The server is running nginx 0.8.53, php-fpm 5.3.2, mysql 5.1.41 and whmcs 4.3. I can log in to the admin portal but when I try save a settings page, the settings get posted to a url such as: action="/custom_admin_dir/configgeneral.php/custom_admin_dir/configgeneral.php?action=save" instead of: action="/custom_admin_dir/configgeneral.php?action=save" This is a copy of my configuration.php <?php $license = "Trial-xxxxxxx"; $db_host = "localhost"; $db_username = "whmcs"; $db_password = "xxxxxx"; $db_name = "whmcs"; $cc_encryption_hash = "xxxxxx"; $templates_compiledir = "/home/username/subdomains/client.domain.com/templates_c/"; $attachments_dir = "/home/username/subdomains/client.domain.com/attachments/"; $downloads_dir = "/home/username/subdomains/client.domain.com/downloads/"; $customadminpath = "custom_admin_dir"; ?> and this is my vhost configuration in nginx. server { listen *:80; server_name client.domain.com; access_log /var/log/nginx/client.domain.access.log main; error_log /var/log/nginx/client.domain.com.error.log; location / { root /home/username/subdomains/client.domain.com/public_html; index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/local/nginx/html; } location ~ /\.ht { deny all; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; include /usr/local/nginx/conf/fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/username/subdomains/client.domain.com/public_html$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; } } Anyone have any suggestions?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated