XML Request

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Clukey
Forum Commoner
Posts: 60
Joined: Fri Apr 21, 2006 9:05 pm

XML Request

Post 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.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

Once you have your XML document send it using cURL
Clukey
Forum Commoner
Posts: 60
Joined: Fri Apr 21, 2006 9:05 pm

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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...
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post 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>
Clukey
Forum Commoner
Posts: 60
Joined: Fri Apr 21, 2006 9:05 pm

Post 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.
Post Reply