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
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