Though I have not worked directly with Paypal, here is a chunk of code I use in working with one of the bigger gateways, FWIW:
use HTTP::Request::Common; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = POST 'http://www.somegateway.com/cgi-bin/somedir', [ somevariable1 => 'foo', somevariable2 => 'bar', ]; my $reply; my $response = $ua->request($req); if ($response->is_success) { $reply = $response->content; } else { print STDERR $response->status_line, "\n"; } ...do something with $reply...
Usually there are parameters that I send (like credit card info) and then I get a reponse code that I parse (such as 'approved', 'declined').
In reply to Re: Question about LWP::UserAgent
by bradcathey
in thread Question about LWP::UserAgent
by tdavis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |