I am trying to use this: http://php.net/manual/en/function.xml-parse-into-struct.php to parse this:
<?xml version="1.0" encoding="utf-8"?>
...but can't work out which numbers to use. I only need to grab the payment ID where the statusID is 4 (for each one as could be 1 or more per xml message).
It's very complicated http://php.net/manual/en/function.xml-parse-into-struct.php
Do you absolutely need to use that function? It's a pretty ancient and convoluted way of accessing XML in PHP.