rpp139 / namecheap

Automatically exported from code.google.com/p/namecheap
0 stars 0 forks source link

Getting error "Parameter OrganizationName is Missing" when trying to register a new domain #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setting the WHMCS Registar Plugin (version 1.0.1.) in a test mode with a
sandbox account.
2. Trying to register a new domain name.
3.

What is the expected output? What do you see instead?
Getting error:Parameter OrganizationName is Missing

What version of the product are you using? On what operating system?
namecheap-whmcs.1.0.1.zip; WHMCS Version: 3.6.1

Please provide any additional information below.
Checked the namecheap.php file and there is no variable OrganizationName.

Original issue reported on code.google.com by raman.de...@gmail.com on 26 Feb 2009 at 11:11

GoogleCodeExporter commented 9 years ago
Hi,
I'm not a developer for namecheap or whmcs.
I've had this issue, and i think i've solved it.
The reason for the error is non alphanumeric chars that goes into the request 
url.

Open namecheap.php and search for "function namecheap_RegisterDomain($params) {"
couple of lines into the function you'll see the arguments list, replace it to 
this:

$RegistrantFirstName = urlencode($params["firstname"]);
    $RegistrantLastName = urlencode($params["lastname"]);
    $RegistrantAddress1 = urlencode($params["address1"]);
    $RegistrantAddress2 = urlencode($params["address2"]);
    $RegistrantOrganizationName = urlencode($params["firstname"]." ".$params["lastname"]); 
    $RegistrantCity = urlencode($params["city"]);
    $RegistrantStateProvince = urlencode($params["state"]);
    $RegistrantPostalCode = urlencode($params["postcode"]);
    $RegistrantCountry = urlencode($params["country"]);
    $RegistrantEmailAddress = ($params["email"]);
    $RegistrantPhone = $params["phonenumber"];
    $RegistrantPhone = str_replace("-","",$RegistrantPhone);
    $RegistrantPhone = str_replace("+","",$RegistrantPhone);
    $RegistrantPhone = str_replace(" ","",$RegistrantPhone);
    # Admin Details
    $AdminFirstName = urlencode($params["adminfirstname"]);
    $AdminLastName = urlencode($params["adminlastname"]);
    $AdminAddress1 = urlencode($params["adminaddress1"]);
    $AdminAddress2 = urlencode($params["adminaddress2"]);
    $AdminCity = urlencode($params["admincity"]);
    $AdminStateProvince = urlencode($params["adminstate"]);
    $AdminPostalCode = urlencode($params["adminpostcode"]);
    $AdminCountry = urlencode($params["admincountry"]);
    $AdminEmailAddress = ($params["adminemail"]);

i've ommited the last 2 variables (admin phone and org) because i've changed 
them to
hardcoded values.

inon.

Original comment by inon.pri...@gmail.com on 6 Apr 2009 at 3:15