Re: Payment_Process

From: Date: Wed, 23 Aug 2006 21:54:20 +0000
Subject: Re: Payment_Process
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24976@lists.php.net to get a copy of this message
Blaine, What are you using to parse your XML with? Last time I checked XML didn't care about newlines or extra space. Maybe you should check out XML_Tree? (it's fine for drivers to depend on external packages that PP doesn't rely on - we plan on spinning them off as their own packages a la MDB2/Validate). --Joe Blaine Lang wrote: > I am developing a payment process class for a new payment gateway and > was having an issue parsing the XML response from the gateway using > the results class method. The issue was solved when I removed all the > newlines from the XML response. > > Example: > <?xml version="1.0" encoding="UTF-8"?> > <Result> > <TransTime>Wed Aug 23 17:47:00 EDT 2006</TransTime> > <OrderID>2006082317470001661</OrderID> > <TransactionType>SALE</TransactionType> > <Approved>APPROVED</Approved> > <ReturnCode>Y:123456:0abcdef:M:X:NNN</ReturnCode> > <SubTotal>2.49</SubTotal> > <FullTotal>2.49</FullTotal> > <PaymentType>CC</PaymentType> > <CardNumber>......0003</CardNumber> > <TransRefNumber>1bd7093d32fde9fd</TransRefNumber> > <CardIDResult>M</CardIDResult> > <AVSResult>X</AVSResult> > <CardAuthNumber>123456</CardAuthNumber> > </Result> > > I can parse it fine using the common class methods once I remove the > newlines via > $this->_rawResponse = preg_replace("/[\n\r]/","",$this->_rawResponse > ); > > I did not see this being needed in any of the other payment gateway > classes - Is this a bug or a feature ? >

« previous php.pear.general (#24976) next »