Jump to content

Niklas

Members
  • Content count

    15
  • Joined

  • Last visited

Everything posted by Niklas

  1. Niklas

    API from any IP

    Hello, I made a small piece of code that i think could help out others with a similar issue. I have about hundred servers that is sending welcome emails out themself instead of having WHMCS to do it. That was annoying since i couldn't resend old emails, so i decided to use the WHMCS API to send emails. But i quickly ran into an issue - i had to add every single server IP on the API allow list. As i couldn't find an option to disable this allow list, i had to figure something else out. I ended up with writing a small PHP script that acts as a proxy to the API, so i only would have to whitelist the IP of the webserver. Simply copy/paste the following code into whmcs/includes/localapi.php (actually localapi.php can be called anything), and then use that file instead of api.php: <?php $ch = curl_init(); $url = str_replace('/'.basename(__FILE__),'/api.php',$_SERVER['REQUEST_URI']); if (isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on') { curl_setopt($ch, CURLOPT_URL, 'https://'.$_SERVER['HTTP_HOST'].$url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); } else { curl_setopt($ch, CURLOPT_URL, 'http://'.$_SERVER['HTTP_HOST'].$url); } if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') { curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $_POST); } curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Lighttpd doesn't support the Expect header. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); curl_exec($ch); ?> Best regards, Niklas
  2. Hi, After version 6.1 it seems the currency selector is hardcoded. I have removed *any* reference and currency selector/dropdown from all templates and orderforms as can be confirmed: web/templates# grep -ir "choose currency" ../lang/ ../lang/german.php:$_LANG['choosecurrency'] = "Choose Currency"; ../lang/english.php:$_LANG['choosecurrency'] = "Choose Currency"; web/templates# grep -ir "choosecurrency" * web/templates# grep -ir "choose currency" * web/templates# So there is no references left in any files to choosecurrency/choose currency, yet that lame ugly box shows up on the ordering page, meaning it must be hardcoded. So does anyone know how i can get rid of this ****************? And why the hell did they start hardcoding stuff like that, that's just stupid (as new changes usually are with WHMCS).
  3. Niklas

    Change Credit Card Encryption Hash

    Correct me if i'm wrong, but isn't the stored CC information encrypted rather than hashed? If that is the case, then you simply loop through each stored card, decrypt the info it using the old key and encrypt it using the new key and then store the new encrypted value. I'm not sure if such script exists in the public, but we're talking something that can be done with 10 lines of coding, so it shouldn't be that difficult if you have some coding experience.
  4. It's because WHMCS doesn't allow N/A to be used as phone number or zip code. Replace value="N/A" with value="1234" and it should work out (not sure if phone number requires more than 4 numbers, give it a try ).
  5. Yes, each template has it's own directory, located in the templates directory in your WHMCS root directory.
  6. Does the input boxes show up? If they do, then you're editing the wrong template or you're viewing a cached copy. To fix the latter, remove the content of templates_c inside your WHMCS installation directory and refresh your browser. If it's only the text description being showed, then it's because you need to remove the table rows/cells for each field you do not want (<tr> and <td> tags), but while keeping the <input> tags.
  7. Niklas

    Email on Clients' Birthday

    DailyCronJob hook described at http://wiki.whmcs.com/Action_Hooks#Miscellaneous with a SQL query to fetch the customers that has birthday, combined with (Send email API) should do the trick.
  8. If you delete the lines, WHMCS will complain that the customer haven't filled out the required values. Instead, replace all type="text" with type="hidden" for the fields you do not wish to show, and make sure they have a value="N/A". You may also want to remove the table row that contains the input fields and descriptions, so the signup page looks normal.
  9. This would require a bit of template customization but i believe it can be done without much hassle. Start by editing the files for the checkout process, so the fields are hidden instead of text and pre-filled with N/A or similar. Then you could remove the address variables from the client area templates and invoice templates, so the 'N/A' isn't being showed to the customer. Finally you would need to change any email template that contains the address variables too. I might have forgotten something, but i think it should work out that way.
  10. Sounds like you enabled the 'Disable Full Client Dropdown' setting (Setup -> General Settings -> Others).
  11. Niklas

    Custom View Tickets Tempalte

    Very cool addition, works flawless. Thank you for sharing it.
  12. Niklas

    Merchant account for France

    Hey I recommend you to give http://www.imglobalpayments.com/ a try. Fast setup time, low rates and great support, i'm really happy with them for my site. / Niklas
×

Important Information

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