Page 1 of 1
XML Request
Posted: Fri Apr 21, 2006 9:18 pm
by Clukey
Hi, I am trying to set up a payment gateway with Concord EFSNet and they require me to use HTTPS Post to send them the information from my payment form in an XML request, but I can't figure out how to do any of this (PHP newbie

). Can anyone offer any insights? Thanks.
Posted: Fri Apr 21, 2006 10:12 pm
by josh
Once you have your XML document send it using cURL
Posted: Sat Apr 22, 2006 12:07 am
by Clukey
How do I create the XML document though because it is not just a static document. The values need to be changed based on the contents of the payment form, so the PHP code needs to edit the xml doc. So, how do I edit it on the fly? Thanks.
Posted: Sat Apr 22, 2006 5:19 am
by timvw
Where exactly are you having a problem? In the simplest form generating xml is the same as generating text or html with php...
Posted: Sat Apr 22, 2006 6:59 am
by Chris Corbyn
Code: Select all
<?php
header('Content-type: text/xml');
//If you have short tags turned on you'll need to echo the xml tag
echo <<<EOD
<?xml version="1.0" encoding="ISO-8859-1"?>
EOD;
?>
<page>
<?php
for ($x = 0; $x<10; $x++)
{
echo '<number>'.$x.'</number>'."\n";
}
?>
</page>
Posted: Sat Apr 22, 2006 11:40 am
by Clukey
I'm really not having any problems because I had no idea where to start as I'm quite new to php, so thanks for the replies. Also though, once I send them the xml request they send back a xml reply, so how do I access that? Thanks.