0

Integrating the google checkout response into simplexml so i can pull the data and save it, but for the annoying reasons can't seem to pull the data out.

Trying to get the item names Bridges: Liquids and Gases, Bridges: Habitats of Australia

SimpleXML = http://pastie.org/private/qtmbsgtinv7x5g6ikrzq

$xml = new \SimpleXMLElement($raw_xml);
   $book = $xml->xpath('//item-name');
   while(list( , $node) = each($book)) {
    echo 'Book: ',$node,"\n";
    }

I've tried different approaches

$book = $xml->xpath('/authorization-amount-notification/order-summary/shopping-cart/items/item/item-name');

1 Answers1

0

Look at the Google Checkout PHP client library source code for more ideas, in particular at the XML parser:

http://code.google.com/apis/checkout/samplecode.html

Mihai Ionescu
  • 2,108
  • 1
  • 12
  • 15