Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Programming > XML
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

XML Questions about XML. Here is where you can post them.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 16th March 2009, 19:18
just Joined!
 
Join Date: Mar 2009
Posts: 2
HolyCow is on a distinguished road
Post Payment Gateway

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>
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 16th March 2009, 20:11
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,272
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

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:
                $bodyhtmlspecialchars($body);
                
$start=false;
                
$start=strpos($body,htmlspecialchars('<Expiration>'));
                  
//todo -  update sql
                
if ($start!=0)
                   {
                   
$date=substr($body,$start+18,10);
                   
$da=explode('/',$date); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 17th March 2009, 06:32
just Joined!
 
Join Date: Mar 2009
Posts: 2
HolyCow is on a distinguished road
Default

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>';
This is my request message.
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 17th March 2009, 11:04
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,272
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Sorry, I don't understand your question.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

« Accesing XML Data | - »

Currently Active Users Viewing This Thread: 6 (0 members and 6 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 16:29.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use