PDA

View Full Version : API and 'getclientproducts' not ok?



OkTeck
02-23-10, 04:02 PM
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

OkTeck
02-24-10, 01:04 PM
Hello, is anyone out there that can consult with me in regards to this?

Thanks,

Matt
02-24-10, 01:37 PM
Open a ticket and we can supply you with a fix for this.

Matt

OkTeck
02-24-10, 01:57 PM
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,

OkTeck
02-24-10, 02:05 PM
Hi Matt,

Please see ticket #142599.

Thanks,