CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Post XML via PERL and Parsing XML returned

 



ka0osk
Novice

Oct 21, 2003, 8:12 AM

Post #1 of 6 (1169 views)
Post XML via PERL and Parsing XML returned Can't Post

Crazy I need to post to a server, using PERL to send XML, then parse the return XML for credit card processing. Does anyone know an easy way to do this? Has anyone got some code?

ka0osk


KevinR
Veteran


Oct 21, 2003, 11:35 AM

Post #2 of 6 (1168 views)
Re: [ka0osk] Post XML via PERL and Parsing XML returned [In reply to] Can't Post

why would you send XML to the server? You should be sending CGI form data, preferably on a secure connection if it contains CC information. There are literally dozens of precoded scripts to do this type of thing, search at www.hotscripts.com or you could make your own CGI form and use the CGI module to parse the form data.
-------------------------------------------------


ka0osk
Novice

Oct 21, 2003, 1:06 PM

Post #3 of 6 (1167 views)
Re: [KevinR] Post XML via PERL and Parsing XML returned [In reply to] Can't Post

UnsureExactly...why indeed?! But thats what my card company needs... XML form data. I need to parse it and then provide a page for the purchaser thanking them with links back to my home page. I suppose I could just put it in a file, then process them myself later, instead of letting it go possibly multithread and getting confused. Maybe I will try that, and use the stream mod on CPAN. It gives me the chance to integrate my UPS shipping stuff and inventory control.

Hey, I think I'll do that!

ka0osk


KevinR
Veteran


Oct 21, 2003, 2:04 PM

Post #4 of 6 (1165 views)
Re: [ka0osk] Post XML via PERL and Parsing XML returned [In reply to] Can't Post

It could be there is something that I am not aware of or do not understand in regards to XML. You can have a CGI form in an XML document, which seems obvious. But besides that, the form works the same (as far as I know) in an HTML document or an XML document.
-------------------------------------------------


davorg
Thaumaturge / Moderator

Oct 21, 2003, 2:57 PM

Post #5 of 6 (1164 views)
Re: [ka0osk] Post XML via PERL and Parsing XML returned [In reply to] Can't Post

Is it some proprietary XML format? Or is it a standard like SOAP or XML::RPC? If it's a standard then there are modules on CPAN for both sending and recieving messages in that format.

Otherwise you can use XML::Simple or XML::Writer to create the XML, LWP to send the HTTP request and get the response, and XML::Parser or one of its subclasses to parse
e the response.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


ka0osk
Novice

Oct 22, 2003, 5:51 AM

Post #6 of 6 (1162 views)
Re: [davorg] Post XML via PERL and Parsing XML returned [In reply to] Can't Post

I probably should have made it clearer... the website user does not see the transaction... he goes to another page, so the transaction has to go on in the background. After the transaction is processed, then the user gets a 'thank you' page. The transaction is XML out and back. I have been looking at XML::STREAM on CPAN, and I think that will work if I do a settlement all at once instead of validating cards on transaction...which is not a good idea anyway because thats how hackers find out valid cards by multi-hitting instant validation processors.

$goob = ka0osk Smile

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives