Jump to content

nuwaninfo

Retired Forum Member
  • Posts

    8
  • Joined

  • Last visited

About nuwaninfo

nuwaninfo's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi, I have been working with whmcs API by using the API fuctions given in the documentation until upgrade to v4. In whmcs v3.82 API:Get Clients Data by Email and API:Get Clients Password have been used for login purpose for by site And in API:Get Clients Data, client password is displyed in plaintext. So i can match it with user entered password. But in the new version for the password it returns the md5 hashed password with salt value. So if any one know how to get the salt value pleas help. Regards, nuwaninfo
  2. Hi, I want to add amount when adding an order(API:Add Order). How can i do this. I would be much appreciated if any one can help me to solve this matter. Thank you.
  3. Hi, I want to add differnt set up fees like addons, when adding a order(API:Add Order). How do i do it. Your help is much appreciated. Thank you.
  4. Hi, I am using getclientsproducts to get the product details of a user. The user has 2 products. So it returns an array with that details of that 2 products. How can i access these details using PHP. I tried to use PHP DOM XML, but it reades only XML data. $url = "url"; # URL to WHMCS API file $whmcsadminusername= "username"; # Admin username goes here $whmcsadminpassword= "password"; # Admin password goes here $postfields["username"] = $whmcsadminusername; $postfields["password"] = md5($whmcsadminpassword); $postfields["action"] = "getclientsproducts"; $postfields["clientid"] = "290"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); /* $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch);*/ $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } //print_r($data); echo '<pre>' . print_r($results, true) . '</pre><br /><br />'; And here is the link to the site. http://www.superquicksite.com/test_api.php I would be much appriciate your help. Thank you.
  5. Hi, I need to add a session when adding a new client. How can i do it. Your help is much appreciated. Thank you.
  6. Hi, It is working now from your help. Thank you very much. Regards, Nuwan
  7. Hi kurbot, Thank you for your reply. But it did not work. Regards, Nuwan
  8. addclient does not work. It says Bad request. i modified necessary details like $url, $username, $password according to my site $url = "http://www.yourdomain.com/whmcs/includes/api.php"; # URL to WHMCS API file $username = "Admin"; # Admin username goes here $password = "demo"; # Admin password goes here $postfields["action"] = "addclient"; $postfields["firstname"] = "Test"; $postfields["lastname"] = "User"; $postfields["companyname"] = "WHMCS"; $postfields["email"] = "demo@whmcs.com"; $postfields["address1"] = "123 Demo Street"; $postfields["city"] = "Demo"; $postfields["state"] = "Florida"; $postfields["postcode"] = "AB123"; $postfields["country"] = "US"; $postfields["phonenumber"] = "123456789"; $postfields["password2"] = "demo"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } print_r($data);die(); The link to my site is: http://www.superquicksite.com/test_api.php your help is much appriciated. Thank you.
×
×
  • 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