HolyCow Posted March 16, 2009 Share Posted March 16, 2009 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 gatway 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. Link to comment https://forums.phpfreaks.com/topic/149629-payment-gateway/ Share on other sites More sharing options...
hastishah Posted March 16, 2009 Share Posted March 16, 2009 hi check out for SimpleXml function of php (simplexml_load_file,simplexml_load_string) and many more. you will get your solution easily. Link to comment https://forums.phpfreaks.com/topic/149629-payment-gateway/#findComment-785712 Share on other sites More sharing options...
HolyCow Posted March 16, 2009 Author Share Posted March 16, 2009 hi check out for SimpleXml function of php (simplexml_load_file,simplexml_load_string) and many more. you will get your solution easily. Thank You. Will check and get back if i face issues. Link to comment https://forums.phpfreaks.com/topic/149629-payment-gateway/#findComment-785731 Share on other sites More sharing options...
HolyCow Posted March 16, 2009 Author Share Posted March 16, 2009 <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> If i put this response code in a variable and now i want to read GatewayTime from that variable, how do i do that Link to comment https://forums.phpfreaks.com/topic/149629-payment-gateway/#findComment-785748 Share on other sites More sharing options...
HolyCow Posted March 16, 2009 Author Share Posted March 16, 2009 simplexml_load_string() is not supported on my hosting server. I get error message Call to undefined function: simplexml_load_string() I am not sure which php version in there on the server. Link to comment https://forums.phpfreaks.com/topic/149629-payment-gateway/#findComment-785769 Share on other sites More sharing options...
hastishah Posted March 18, 2009 Share Posted March 18, 2009 hello sorry for late reply... The SimpleXML extension requires PHP 5. you should assign your output to php varaible. $output = $xmloutput; $output = str_replace('tns:','',$output); $result = simplexml_load_string($output) ; foreach($result as $OperationResultSet->ResultSet => $value) { echo $value['ResultName'] or $value->ResultName; // chect it.. any of options } If you need more help than contant me. Link to comment https://forums.phpfreaks.com/topic/149629-payment-gateway/#findComment-787494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.