Jump to content

sith

Senior Member
  • Content count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About sith

  • Rank
    Junior Member
  1. It worked! I hope that it didn't break something else. And it was unnecessary to restore from within a hook. I just restored before returning from the ClientArea callback. Thanks for pointing me in the right direction!
  2. Hi! I'm trying to use the localAPI with the AddOrder and AddClient commands from within a module ClientArea-function. Everything works fine except that the current session is changed. This means that if a client logs in normally to the client area, the next request after the request that triggers the localAPI call will result in a logout and a redirect to the login page. If the same is done as an admin using the "login as client" button, it results in a redirect to the client the order was added for or the new client. According to WHMCS support, you're not supposed to call AddOrder and AddClient from this context. And since this is not intended functionality they suggested that I ask here. Does anyone have any idea about a workaround? I'm thinking that I could restore the client area session with a hook. What data do I need to store to be able to do that? I guess I could implement this AddOrder/AddClient by editing the database directly, however I really want to avoid this. Implementing a work queue that is executed in another context would also be an option, however, I'm not really sure about from which contexts I'm actually allowed to call AddOrder and AddClient, it seems like this is not documented.
  3. Git history was a good idea. Thanks.
  4. Where can I find documentation for previous versions of the API? My understanding is that https://developers.whmcs.com/api-reference/ only points at the most recent version of the API. I'm interested in version 7.7.1. (I know I can look at the change log, but it's a bit inconvenient.)
  5. Is this possible or do I have to obtain this info through an SQL query? Regards,
  6. Thanks for info! I managed to create a new account at whmcs.com and file a proper bug report.
  7. After calling AddOrder from my server module interface, I get redirected to the client that the order was added for. Is there any way I can prevent this behavior? The AddOrder command seems to be functional except for the affid parameter.
  8. Hi, AddOrder return 'productids' not 'serviceids'. (And whmcs.com should probably look in to their mail server configuration. No email is sent when I request a new password. So I'm not able to report this as a bug..) Regards
  9. Ok, my fault. I had to use json_encode to be able to print the output with logActivity.
  10. Nothing is returned. Any suggestions on how to solve this? WHMCS version: 7.7.1 $command = 'GetProducts'; $postData = array( 'gid' => '16', ); logActivity( localAPI($command, $postData), 0); Returns empty string. I have tried different parameters. But it shouldn't matter. I should at least get a JSON stating that the call failed, right? Other calls like `GetClientsDetails` work. Regards
  11. Welcome to WHMCS.Community sith! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×

Important Information

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