Jump to content

mhramos

Member
  • Posts

    10
  • Joined

  • Last visited

About mhramos

Recent Profile Visitors

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

mhramos's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Sorry my english... i speak spanish. Until finally, the parameters are taken by the function ... here is the updated code. <?php if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } function fix_cu_contact($vars) { $CC = $vars['params']['countrycode']; //if ($CC == 'CU') { #Commenting to temporaly change all WHOIS data before register any domain (test pourposes) mail("xxxx@xxxx.xxxxxxxxx", $vars['params']['countrycode'], "Linea 0\nLinea 2\nLinea 3"); // (test pourposes too) $vars['params']['address1'] = $vars['params']['adminaddress1']; $vars['params']['address2'] = $vars['params']['adminaddress2']; $vars['params']['city'] = $vars['params']['admincity']; $vars['params']['state'] = $vars['params']['adminstate']; $vars['params']['fullstate'] = $vars['params']['adminfullstate']; $vars['params']['countrycode'] = 'US'; $vars['params']['countryname'] = 'United States'; $vars['params']['phonenumber'] = $vars['params']['adminphonenumber']; $vars['params']['phonecc'] = '+1'; $vars['params']['fullphonenumber'] = $vars['params']['adminfullphonenumber']; mail("xxxx@xxxx.xxxxxxxxx", $vars['params']['countrycode'], "Linea 1\nLinea 2\nLinea 3"); // (test pourposes too) // } } add_hook("PreRegistrarRegisterDomain", 1, "fix_cu_contact"); ?> Look what I put to send me an email (for testing purposes) before the variables are processed ... and another one after processed ... and correct !! I get the first email with the original country ... and the second email already with the country changed to the United States ... I commented the IF so that it applies at the moment to everything. As well as it is internally within the function it obtains well the variables that are sent to it by WHMCS and makes the change ... the question is now ... How to return them to change WHOIS? According to the hookpoint I used now (PreRegistrarRegisterDomain) ... look at the documentation and above all the sample code: https://developers.whmcs.com/hooks-reference/domain/#preregistrarregisterdomain Documentaation about "PreRegistrarRegisterDomain" says that an array can be returned .. and if we return the same overwritten array? (Sorry if I'm saying a dumb) Because the thing is that inside the function makes the change well already ... but it does not leave the function ... to the registrar the client's data are still being sent. PS: the hook is in /includes/hooks folder.
  2. I am already put the file in includes/hooks/fix_cu_contact.php calling the hook point "PreRegistrarRegisterDomain". According to https://developers.whmcs.com/domain-registrars/module-parameters/ https://developers.whmcs.com/hooks-reference/domain/#preregistrarregisterdomain This hook should modify the WHOIS information that is passed to the registrar at the time of registering a domain. However, it still does not work. Please, help me, I need to know why the hook does not modify WHOIS data. I can not find any errors in the logs, I'm blind. Greetings
  3. Hello, We are trying to make a customization for a registrar module (by hooks). We need the module to work exactly as it does any registrar official WHMCS module but with the following customizations: If the country used in the customer's personal data is Cuba. Then the data to be used at the time of registering / transferring the domain is the company data used for the administrative and billing contact (those selected in the domain tab of the general configuration of WHMCS) or other saved in the hooks file. In other words, if the client is from Cuba, then the domains for this client are registered in favor of our company and not in favor of the client. If the client is from Cuba, then he does not have the possibility to modify the WHOIS data of the domain from his client area. For customers from other countries the module should function exactly like the official module. According to WHMCS this can be done by Hooks. Bellow the WHMCS suggestion: We already made the hook file as suggested but I think the module is not recognizing the hook. It does not generate errors, absolutely nothing, as if it were not. I have already disabled the module and I have reactivated it and nothing happens. I'm testing it with the Email registrar module and ENOM test enviroment. Any idea why the hook is not recognized? The file hooks.php is on registrar root folder as suggested: /home/useraccount/public_html/modules/registrars/enom/hooks.php The domain registration process is performed as usual and the hook's indications of changing the data are not taken into account if the customer's country is Cuba. Here is the code written in the hooks.php file. <?php if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } function fix_cu_contact($vars) { $CC = $vars['countrycode']; global $params; //if ($CC == 'CU') { #Commenting to temporaly change all WHOIS data before register any domain (test pourposes) $params['address1'] = $vars['adminaddress1']; $params['address2'] = $vars['adminaddress2']; $params['city'] = $vars['admincity']; $params['state'] = $vars['adminstate']; $params['fullstate'] = $vars['adminfullstate']; $params['countrycode'] = 'US'; $params['countryname'] = 'United States'; $params['phonenumber'] = $vars['adminphonenumber']; $params['phonecc'] = '+1'; $params['fullphonenumber'] = $vars['adminfullphonenumber']; // } } add_hook("PreRegistrarRegisterDomain", 1, "fix_cu_contact"); ?> Can anyone give me a hint as to why it is not working?
  4. Hello, We need a customization for ResellerClub (by hooks). We need the module to work exactly as it does the official WHMCS module but with the following customizations: If the country used in the customer's personal data is Cuba. Then the data to be used at the time of registering / transferring the domain is the company data used for the administrative and billing contact (those selected in the domain tab of the general configuration of WHMCS) or other saved in the hooks file. In other words, if the client is from Cuba, then the domains for this client are registered in favor of our company and not in favor of the client. If the client is from Cuba, then he does not have the possibility to modify the WHOIS data of the domain from his client area. For customers from other countries the module should function exactly like the official module. According to WHMCS this can be done by Hooks. Bellow the WHMCS suggestion: We are waiting for some developer who wants to help us in this matter. Greetings
  5. Hello, We need a customization for ResellerClub (by hooks). We need the module to work exactly as it does the official WHMCS module but with the following customizations: If the country used in the customer's personal data is Cuba. Then the data to be used at the time of registering / transferring the domain is the company data used for the administrative and billing contact (those selected in the domain tab of the general configuration of WHMCS) or other saved in the hooks file. In other words, if the client is from Cuba, then the domains for this client are registered in favor of our company and not in favor of the client. If the client is from Cuba, then he does not have the possibility to modify the WHOIS data of the domain from his client area. For customers from other countries the module should function exactly like the official module. According to WHMCS this can be done by Hooks. Bellow the WHMCS suggestion: We are waiting for some developer who wants to help us in this matter. Greetings
  6. Hello, QR code is not loading in the invoice. Any help?
  7. Yes, I have SSL installed on my website. Google Checkout actually sounds very good option. Everything that comes from Google has quality and it's free or cheap.
  8. Moneybookers looks good but to me they asked me a reserve of $ 300. I think Google Checkout best, have very good rates. Paypal is very abusive and arbitrary, for anything, you are limited to the account.
  9. I hope they can fix this would be a good thing, maybe the creators of WHMCS could collaborate a little.
  10. Hi, Sending SMS is me not working properly. Only send the SMS if they open support tickets from the customer area but if you open or respond via e-mail does not send the SMS. I hope to help me with this because most of my tickets are opened and respone via email. Excuse my bad English but I speak Spanish. Greetings
×
×
  • 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