Payment_Process

From: Date: Wed, 23 Aug 2006 21:50:59 +0000
Subject: Payment_Process
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24975@lists.php.net to get a copy of this message
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 (#24975) next »