Jump to content

steven99

Level 2 Member
  • Content count

    550
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by steven99

  1. You can get the option within the client area with a custom addon and form on the manage credit card page that submits to the addon to toggle the setting and the addon then redirects back to the manage card page. You could also skip the addon and use a hook that watches for $_POST with specific variables and use that same form to post to clientarea.php?action=creditcard . That method may conflict with WHMCS handling of the form submission and would require testing.
  2. steven99

    question about multiple gateways

    WHMCS only attempts charges to the gateway the invoice is assigned to and wont automatically switch to another. Unfortunately there isn't a hook, at least documented, for payment failure for you to then do an action. An addon module would be needed to go through invoices and switch overdue invoices to another automated gateway. Also, if both gateways use tokens, only one can be used at a time and so switching between them for automated payments wont work.
  3. steven99

    PHP script in a .tpl file

    Yes by using the php smarty tag and enabling php tags in the configuration, however, it is not advised.
  4. steven99

    Creating a module

    To save the info, you would use the first mentioned code with the function. Below is an updated version of that function with the api to save. function carros7_CreateAccount($params) { if ($params["server"] == 1) { $Chave = md5($params['configoptions']["chave"]); $postvars = array( 'key' => $params["serveraccesshash"], 'action' => 'adicionar', 'nomeCompleto' => $params['clientsdetails']['firstname'].$params['clientsdetails']['lastname'], // Get full name {Still does not work} 'email' => $params["clientsdetails"]["email"], 'usuario' => ((isset($params["username"]) and !empty($params["username"])) ? $params["username"] : $params['clientsdetails']['firstname'].$params['clientsdetails']['lastname']), 'senha' => $params["password"], 'Chave' => $Chave, 'matrizFiliais' => $params["configoption1"], 'veiculos' => $params["configoption2"], 'funcionarios' => $params["configoption3"] ); $postdata = http_build_query($postvars); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . 'whmcs/criar.php'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata); $answer = curl_exec($curl); logModuleCall('carroswhmcs','CreateAccount_UserAccount','https://' . $params["serverhostname"] . 'whmcs/criar.php?'.$postdata,$answer); if (strpos($answer,"OK")!==false) { $result='success'; $CustomFields = base64_encode( serialize( array('Chave' => $Chave ) ); $AccountIDadd = localAPI('updateclientproduct', array("username"=>$params["username"],'serviceid'=>$params['serviceid'],'customfields' => $CustomFields)); if ($AccountIDadd) return $result; } else { $result=json_decode($answer,true); $result=$result['msj']; } return $result; } return "unknown error"; }
  5. steven99

    Creating a module

    function carros7_CreateAccount($params) { if ($params["server"] == 1) { $postvars = array( 'key' => $params["serveraccesshash"], 'action' => 'adicionar', 'nomeCompleto' => $params['clientsdetails']['firstname'].$params['clientsdetails']['lastname'], // Get full name {Still does not work} 'email' => $params["clientsdetails"]["email"], 'usuario' => (isset($params["username"]) and !empty($params["username"]) ? $params["username"] : $params['clientsdetails']['firstname'].$params['clientsdetails']['lastname']), 'senha' => $params["password"], 'Chave' => md5($params['configoptions']["chave"]), 'matrizFiliais' => $params["configoption1"], 'veiculos' => $params["configoption2"], 'funcionarios' => $params["configoption3"] ); $postdata = http_build_query($postvars); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://' . $params["serverhostname"] . 'whmcs/criar.php'); curl_setopt($curl, CURLOPT_RETURNTRANSFER,true); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata); $answer = curl_exec($curl); logModuleCall('carroswhmcs','CreateAccount_UserAccount','https://' . $params["serverhostname"] . 'whmcs/criar.php?'.$postdata,$answer); } if(strpos($answer,"OK")!==false){$result='success';}else{$result=json_decode($answer,true); $result=$result['msj'];} return $result; }
  6. steven99

    Creating a module

    You would use that within the _CreateAccount function of the provisioning module you're developing, in this case in the carros7.php file. So for example, you complete your backend processes for deploying the car to the renter and then you save the details using that code.
  7. steven99

    Creating a module

    In the provisioning module's create function, update the service details with the username you want to use. You can also use a hook to do this before the order is accepted. As for the custom field, you would save the custom field with API with for example the following. $CustomFields = base64_encode( serialize( array('CHAVE' => md5('example.') ) ); $AccountIDadd = localAPI('updateclientproduct', array("username"=>$User,"password"=>$UserPass,'serviceid'=>$params['serviceid'],'customfields' => $CustomFields)); You can also use that for the first item mentioned.
  8. Setup the ticket department to pull mail from a pop3 mailbox and have "Pipe Replies Only" disabled in the department settings. Any reply that includes the ticket number in the subject should then be routed through and added to the existing ticket.
  9. steven99

    Credits

    Correct, any credit on the account would be applied on the due date of the invoice just before it tries to charge the card. This will be indicated in the invoice as a credit line item in the balances and within the admin as "Credit card + partial credit" or "fully paid with credit" depending on which outcome the credit made.
  10. steven99

    Pages Management And Customization

    See the CMSE Content Framework module that @brian! mentioned. There are other modules that do the same thing also but some have been abandoned. WHMCS is primarily a billing and deployment system and not content management or primary site system but with modules or using custom pages it can be both. Not sure what a video would explain more than already mentioned...?
  11. steven99

    3rd Party payment gateway

    All (most) developer info is at https://developers.whmcs.com/ including API calls .
  12. steven99

    Adding a script to ticket confirmation

    You need to encase javascript with {literal} tags as smarty uses curly brackets for its use. As for the confirmation page, more information is needed on how you put it in there? via hook, template change, etc.
  13. If you are able to do manual capture via the invoice page, then you do not need the client to do anything. And if you are able to capture, then it should be automatically doing so. Check the billing menu -> gatway log for any errors during the daily batch. If it doesn't work, check your automation settings, including crons.
  14. steven99

    I want my email for all customer domains

    IIRC ICANN only requires the real data to be stored and available upon their request as well as the email address to be working. So the example above would maintain that holding of info as it would be required for the forwarding. However, it has been a while since I looked at those rules and so could require other items.
  15. steven99

    I want my email for all customer domains

    Well, that may be allowed under whois privacy rules at that is basically what those services are suppose to do.
  16. steven99

    I want my email for all customer domains

    Would have to agree with @brian! as that could be against ICANN rules and thus get you in trouble with the upstream provider if complaints happened for example.
  17. That issue is only when provisioning accounts and not while replying to a ticket or sending an email to the client. Also, while having graceful restarts you mainly need to have the apache restart interval set from 0 (instant) to something else. That setting is under the apache settings in tools and settings in plesk admin.
  18. Well, on the flip side of that ioncube prevents malware scanners from finding their targets. So one can say removing it actually improves security as well. Though really the host in question should provide options to continue to use it on their systems.
  19. Have seen other places, like wpengine, losing support for ioncube. Having ioncube and opcache enabled at same time wont be an issue, have that setup currently, but as mentioned they just wont cache. As you're on a shared server and the provider is tossing ioncube, your options are limited to moving to a different host or different platform with them that has ioncube.
  20. Are you using Comodo mod security rules? If so, check site's apache error_log for a mod security hit. The last time I had this behavior it was false positive for a SQL injection by a generic rule in comodo WAF rule set. It also affected other scripts, like Wordpress.
  21. steven99

    Stripe Gateway redirect

    As far as I am aware, Stripe does not have an interface where clients enter their card information as that is suppose to be done within the same interface of the billing app, in this case WHMCS or your other client area. As such, you need an interface within WHMCS or the other client area you mention.
  22. Those would be the correct hooks, but they don't support any returns and thus wont help here. What you could do is use those hooks and redirect back to the server page when your tests fail and set a session variable of "server_error". Then use an AdminAreaHeaderOutput hook and check for that session variable and display error.
  23. steven99

    Stripe Gateway redirect

    So to clarify, it redirects to /clientarea.php instead of /creditcard.php ? Which functions do you have setup?
  24. What is the transaction flow here? Does the client leave WHMCS, like with PayPal, or do they stay on the payment page? Also, is $_SESSION['return_url'] actually set?
  25. steven99

    Payments

    Check the marketplace for a module. If there is none there, then you would need to develop your own payment gateway module or hire someone to do so via the requests community.
×

Important Information

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