Deffe Posted March 2, 2012 Share Posted March 2, 2012 Hi ppl! Im developing a custom made cart for our companys hosting sollution and I am just about to inject the data into the whmcs. But I ran into some problems, or perhaps more confusion. Why do you format your order/cart array like this? $postfields["action"] = "addorder"; $postfields["clientid"] = "1"; $postfields["pid[0]"] = "1"; $postfields["domain[0]"] = "whmcs.com"; $postfields["billingcycle[0]"] = "monthly"; $postfields["pid[1]"] = "1"; $postfields["domain[1]"] = "whmcs2.com"; $postfields["billingcycle[1]"] = "monthly"; $postfields["pid[2]"] = "5"; $postfields["domain[2]"] = "whmcs3.com"; $postfields["billingcycle[2]"] = "annually"; $postfields["noemail"] = "true"; $postfields["paymentmethod"] = "authorize"; My cart/array/oject is built in a normal fashion structure. I cant find a reason for formating the items like this. I could easily format my order into this but I just cant understand Why you choose to do it like this? Please explain since I am sure there is a very good and logical reason for it. My current array looks like this. Array ( [domains] => Array ( [0] => Array ( [type] => register [productID] => 0 [domain] => xxx.se [serviceID] => [extraInformation] => [regperiod] => 1 [eppcode] => [tld] => se [price] => 49 ) ) [products] => Array ( [0] => Array ( [pid] => 3 [domain] => xxx.se [name] => Basic [price] => 75 ) ) [action] => addorder [paymentmethod] => faktura [clientid] => 6 ) but yours is ... well just strange. why ?=) 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.