PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Having fun with web services are we? Navigating the results can always be loads of fun.
I'm guessing this is just a typo but your dump doesn't have MakeCcPaymentResult anywhere in it, only MakePaymentResult. What I usually do in a case like this is to drill through the dump like so.....
var_dump($retval->MakePaymentResult)
....which will give you more focused result set of those properties.....
var_dump($retval->MakePaymentResult->PSObject)
.... and so on and so forth. Just keep drilling through the dump til you get to where you need.
If indeed it is an array, it should print all your array values. If for some reason no array values exist, then it would be obvious why [0] wont return anything.
The only other thing i could think of would be permissions to the array, but i really dont think that has anything to do with your problem.
Did you try........
$retval->MakePaymentResult->PSObject->Type ? Don't forget you access property values with the -> indicator. That's about the best I can do just looking at your dump.
If there's only one object in the array, PHP throws out the whole array thing.
But.. it's an object. Not an array.
By the way, it looks like no one has noticed this... Your var_dump shows that there is a PsObject inside of your PsObject.
So, to get type, you'd use $retval->MakePaymentResult->PsObject->PsObject->Type
Web services can be a little touchy at times, and I always get a fresh headache just about every day navigating their results. It helps if you're the one writing the services too but even then they can be an exercise in keyboard-snapping frustration. What are these web services written in, if you don't mind my asking?