![]() |
|
|
|||||||
| XML Questions about XML. Here is where you can post them. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
I have setup a payment gateway on my client site and its working fine. Now the gateway company has changed their setting which i am supposed to implement in my existing gateway. The new gateway is based on XML Schema Definition language (XSD). My question is i send the data to the gateway in there specified XML XSD format and they send me a response packet in the same XML XSD format. I want to know how can i read the response packet. Bocz if i put this response in a variable i cannot read the whole thing. This gateway also takes care if the customer’s credit card is enrolled for 3D Secure transactions. So firstly i check if the customer is enrolled for 3D Secure transactions, if yes than redirect to bank website, if not that than redirect to gateway. I cannot paste the code here as the gateway ppl say its confidential. Code:
<tns:OperationResultSet resultSetName="fthct" oprState="0" oprName="hello"> <tns:ResultSet> <tns:Result> <tns:ResultName>helloId</tns:ResultName> <tns:ResultType>Integer</tns:ResultType> <tns:ResultValue>41</tns:ResultValue> </tns:Result> <tns:Result> <tns:ResultName>mailId</tns:ResultName> <tns:ResultType>Long</tns:ResultType> <tns:ResultValue>10814</tns:ResultValue> </tns:Result> <tns:Result> <tns:ResultName>GatewayTime</tns:ResultName> <tns:ResultType>Date</tns:ResultType> <tns:ResultValue>2008-01-01 00:12:25.105</tns:ResultValue> </tns:Result> I get error message Call to undefined function: simplexml_load_string() I am not sure which php version in there on the server. |
| Sponsored Links |
|
|
|
||||
|
phpinfo(); will tell you the version
Don't know if any of this will help. This is something I've used. PHP: XML Parser - Manual And a thread with a little demo xsd xml free class And this is a nonstandard way I did for something. I knew what was coming in and it was pretty standard all the time so I could manually parse it. PHP Code:
|
|
|||
|
Php code:
Code:
$XML='<tns:Request> <tns:MsgHeader> <tns:Gateway></tns:Gateway> <tns:Credentials> <tns:LoginId>/tns:LoginId> <tns:Password></tns:Password> </tns:Credentials> </tns:MsgHeader> <tns:MsgBody> <tns:Operations> <tns:Operation> <tns:ParameterList> <tns:ParameterDef parameterName="posId" parameterType="String" parameterValue="41"/> <tns:ParameterDef parameterName="transactionId" parameterType="String" parameterValue="$rand"/> <tns:ParameterDef parameterName="cardNo" parameterType="String" parameterValue="$cardnumber"/> </tns:ParameterList> </tns:Operation> </tns:MsgBody> </tns:Request>'; Now if i parse or display this $xml i see all the details leaving details inside parameterdef, why is that? Do i have to write this parameterdef message in a diff way. |
![]() |
| Currently Active Users Viewing This Thread: 6 (0 members and 6 guests) | |
| Thread Tools | |
| Display Modes | |
|
|