Stephenitsg Posted January 23, 2014 Share Posted January 23, 2014 Im am having some trouble with the local API. Trying to get the current price of a product, the call seems to be working but I cant get the data out of the array. $getCurrentValues = array("serviceid" => "$clientIDTemp"); $results = localAPI("getclientsproducts",$getCurrentValues,"formbuilder"); $amt = $results["recurringamount"]; Here is the Result : Array ( [result] => success [clientid] => [serviceid] => 69 [pid] => [domain] => [totalresults] => 1 [startnumber] => 0 [numreturned] => 1 [products] => Array ( [product] => Array ( [0] => Array ( [id] => 69 [clientid] => 77 [orderid] => 67 [pid] => 59 [regdate] => 2014-01-22 [name] => Cloud Backup Data Usage [groupname] => Online Services [domain] => [dedicatedip] => [serverid] => 0 [servername] => [serverip] => [serverhostname] => [firstpaymentamount] => 0.00 [recurringamount] => 5.00 [paymentmethod] => paypalpaymentspro [paymentmethodname] => Credit Card [billingcycle] => Monthly [nextduedate] => 2014-01-24 [status] => Active [username] => [password] => [subscriptionid] => [promoid] => 0 [overideautosuspend] => [overidesuspenduntil] => 0000-00-00 [ns1] => [ns2] => [assignedips] => [notes] => ITSG [diskusage] => 0 [disklimit] => 0 [bwusage] => 0 [bwlimit] => 0 [lastupdate] => 0000-00-00 00:00:00 [customfields] => Array ( [customfield] => Array ( ) ) [configoptions] => Array ( [configoption] => Array ( ) ) ) ) ) ) The Recurringamount field shows 5 dollars if I spill the array, but nothing in my variable. Any help would be great. Thanks, Stephen 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted January 24, 2014 Share Posted January 24, 2014 You can access the recurring amount as follows: $results["products"]["product"][0]["recurringamount"] 0 Quote Link to comment Share on other sites More sharing options...
Stephenitsg Posted January 24, 2014 Author Share Posted January 24, 2014 That did the trick ! Thanks 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.