Hi,
I'm working on a purchase system integrated with PayPal's Website Payment Pro System (paypal's version of a merchant account). I've been able to verify payments and get a return response from their system but I am unsure how to extract the response into either an array or separate variables.
The return response is XML SOAP coding. Here is the response...
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cc="urn:ebay:apis:CoreComponentTypes" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:ns="urn:ebay:api:PayPalAPI">
<SOAP-ENV:Header>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext" xsi:type="wsse:SecurityType"></Security>
<RequesterCredentials xmlns="urn:ebay:api:PayPalAPI" xsi:type="ebl:CustomSecurityHeaderType">
<Credentials xmlns="urn:ebay:apis:eBLBaseComponents" xsi:type="ebl:UserIdPasswordType">
<Username xsi:type="xs:string"></Username>
<Password xsi:type="xs:string"></Password>
<Subject xsi:type="xs:string"></Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body id="_0">
<DoDirectPaymentResponse xmlns="urn:ebay:api:PayPalAPI">
<Timestamp xmlns="urn:ebay:apis:eBLBaseComponents">2005-12-30T03:55:11Z</Timestamp>
<Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
<CorrelationID xmlns="urn:ebay:apis:eBLBaseComponents">3aa120149db6a</CorrelationID>
<Version xmlns="urn:ebay:apis:eBLBaseComponents">1.000000</Version>
<Build xmlns="urn:ebay:apis:eBLBaseComponents">1.0006</Build>
<Amount xsi:type="cc:BasicAmountType" currencyID="USD">110.00</Amount>
<AVSCode xsi:type="xs:string">X</AVSCode>
<CVV2Code xsi:type="xs:string">M</CVV2Code>
<TransactionID>6FU53355VC474712D</TransactionID>
</DoDirectPaymentResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I've been able to display the results with the following code...
$xml = simplexml_load_string($xml);
echo "<pre>";
print_r ($xml);
echo "</pre>";
I am assuming I need a XML Parser but not being familiar with XML, I don't know how to continue. Any help is greatly appreciated!
Thank you.