Jump to content

API and 'getclientproducts' not ok?


OkTeck

Recommended Posts

Hey guys,

 

I have WHMCS installed and am testing the API hooks and am trying to 'getclientproduts' based on this API manual: http://wiki.whmcs.com/API:Get_Clients_Products

 

Why is it not nesting <product> nodes under <products> as the doc says? Instead, it seems to be returning multiple <id> nodes and such... this just makes me have to code more to get the job <product> nodes would have done for me.

 

When I get my return from the web server and turn it into a SimpleXMLElement, I get the following element:

 

SimpleXMLElement Object
(
   [action] => getclientsproducts
   [result] => success
   [clientid] => 72
   [totalresults] => 2
   [products] => SimpleXMLElement Object
       (
           [id] => Array
               (
                   [0] => 53
                   [1] => 70
               )

           [orderid] => Array
               (
                   [0] => 0
                   [1] => 1
               )

           [pid] => Array
               (
                   [0] => 5
                   [1] => 1
               )

           [domain] => Array
               (
                   [0] => example.com
                   [1] => example2.com
               )

           [server] => Array
               (
                   [0] => 1
                   [1] => 1
               )

           [paymentmethod] => Array
               (
                   [0] => paypal
                   [1] => paypal
               )

           [firstpaymentamount] => Array
               (
                   [0] => 0.00
                   [1] => 0.00
               )

           [recurringamount] => Array
               (
                   [0] => 0.00
                   [1] => 0.00
               )

           [billingcycle] => Array
               (
                   [0] => Free Account
                   [1] => Quarterly
               )

           [nextduedate] => Array
               (
                   [0] => SimpleXMLElement Object
                       (
                       )

                   [1] => 2010-01-19
               )

           [status] => Array
               (
                   [0] => Active
                   [1] => Active
               )

           [username] => Array
               (
                   [0] => restore
                   [1] => galena
               )

           [password] => Array
               (
                   [0] => SimpleXMLElement Object
                       (
                       )

                   [1] => tgu5K61v2R
               )

           [customfields] => Array
               (
                   [0] => SimpleXMLElement Object
                       (
                       )

                   [1] => SimpleXMLElement Object
                       (
                       )

               )

       )

)

 

Anyone? Am I doing it wrong?

 

Regards,

 

Jamie

Link to comment
Share on other sites

Open a ticket and we can supply you with a fix for this.

 

Matt

 

Hi,

 

I'm a developer working for a client of mine who has bought a copy of WHMCS. Can I open a ticket even if I don't have a bought copy? If not, maybe you can help me via private e-mail since I haven't access to the help desk?

 

Thanks for your reply Matt,

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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