Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > another 'POST from perl' question

Thread Tools

another 'POST from perl' question

Posts: n/a
I've searched for several weeks, and I've found code that should allow
me to post from my perl script. I continue to fail, though.
Admittedly, I am not good with OOP (other than VB). I'm trying to post
so as to process credit card info, and states that I must
POST with a query string (?), but don't use GET. In short, I've tried:
use CGI; use LWP::UserAgent; use HTTP::Request;
use HTTP::Status; $cgi = new CGI;
my $ua = LWP::UserAgent->new;
my $submit_str = "x_login=$acct_id&x_tran_key=$tran_key";
my $request = new HTTP::Request 'POST', $transaction_server;
my $response = $ua->request($request);
$resp = $response->content;
if ($response->is_success) { print "Success"; }
else { print "Fail"; }

and I've tried a combination of variations:
my $response = $ua->request(POST $transaction_server,
['x_login' => $acct_id, 'x_tran_key' => $tran_key],);

including passing my data as a query_string, but I just can't make it to
is_success. I also can't decipher the hash that LWP appears to return.

I've looked at cpan,, and my cookbook, but to no avail. Tech
support doesn't support scripts, so they're little help.

Any suggestions or help? I apologize for my ignorance.
Thank you,

Reply With Quote

Thread Tools

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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Another basic question: How to call and show one Web Form from another Web Form? Rob R. Ainscough ASP .Net Web Controls 3 06-14-2005 03:56 PM
another newbie question from another newbie.... Lee UK VOIP 4 05-17-2005 04:10 PM
Renaming a project with another project as the starting point? In another solution Maziar Aflatoun ASP .Net 1 01-22-2005 12:49 AM
How to access: a page from a User control, and another User controlfrom another one? qwerty ASP .Net 3 09-30-2004 05:32 PM
Access a control inside an usercontrol from another control inside another usercontrol nail ASP .Net 0 09-15-2004 03:55 PM