cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing Response from CIM in php

I am trying to parse the transaction ID in php from the xml response given after createCustomerProfileRequest. This is the l code I am using.


echo $response;

list ($refId, $resultCode, $code, $text, $customerProfileId) = parse_return($response);

echo "<br><br><br>".$customerProfileId."<br><br><br>";



When the response is echoed I can find the customer ID at the very end, but $customerProfileId doesn't return anything.

Thanks for the help 

--
-Mucle6

mucle6
Member
1 REPLY 1

It doesn't look like you are using our SDK, so I can't really guess what is going on in the parse_return method that you referenced. If you would like to handle the XML directly, I would recommend converting it to a simpleXML object. You can then access the profile ID directly.

 

$response = simplexml_load_string($response,'SimpleXMLElement', LIBXML_NOWARNING)
$customerProfileId = $response->customerProfileId
Trevor
Administrator Administrator
Administrator