romatr Posted November 10, 2008 Share Posted November 10, 2008 Hi, I'm using code closed to example http://wiki.whmcs.com/API:Example_Usage. This data is using with curl calls to https://www.yourdomain.com/whmcs/includes/api.php (https, not http as in documentation). $postfields: Array ( [username] => myadmin [password] => md5_of_myadmin_password [action] => addinvoicepayment [invoiceid] => 93 [amount] => 5 [transid] => 140-948 [gateway] => mygateway ) As a reply from api.php I get empty value, I think I have to get something like this: result=error;message=Some_error_message or result=success;message=Some_success_message. But it simply empty. What the problem? 0 Quote Link to comment Share on other sites More sharing options...
Klangaroo Posted November 11, 2008 Share Posted November 11, 2008 if you're getting no responce at all, it means you're either not recording the cURL returned array, or your API page isn't viewable over the https socket. try opening your API page in your browser using HTTP, and using HTTPs. you should get a page saying something like "message=invalid password" or something like that. if it's just blank, you have a problem that's not to do with your code. 0 Quote Link to comment Share on other sites More sharing options...
Alticon-Brian Posted November 11, 2008 Share Posted November 11, 2008 romatr, this may be too much information but check out the documentation i wrote for hitting a (different) API with curl / PHP, it may be of some help. http://dev.salsacommons.org/o/8001/p/salsa/commons/dev/docs/api/cookbook/php.sjs 0 Quote Link to comment Share on other sites More sharing options...
romatr Posted November 11, 2008 Author Share Posted November 11, 2008 to Alticon-Brian: Thank you. I worked early with curl, I know it to Klangaroo: Thank you for your thought About SSL. The problem was in it. Now all ok. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.