inblosam has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl my $query=''; my @inp=split(/\:/,$input{input_fields}); foreach my $ikey (@inp){ next if $ikey=~/inview|cid/is; $query .= "\&$ikey=$input{$ikey}"; } $query .= '&cmd=_notify-validate'; # post back to PayPal system to validate (in same order as they passed + it to us) use LWP::UserAgent; $ua = new LWP::UserAgent; $req = new HTTP::Request 'POST','http://www.paypal.com/cgi-bin/webscr' +; $req->content_type('application/x-www-form-urlencoded'); $req->content($query); $res = $ua->request($req); my $result=''; if ($res->is_error) { $result='HTTP Error'; print 'HTTP Error\n'; } else{ $result = $input{payment_status}; } print "\nRESULT:$result\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: post variables in same order
by chromatic (Archbishop) on Jun 27, 2002 at 20:01 UTC | |
|
Re: post variables in same order
by dws (Chancellor) on Jun 27, 2002 at 20:24 UTC | |
by inblosam (Monk) on Jun 28, 2002 at 05:05 UTC | |
by dws (Chancellor) on Jun 28, 2002 at 16:10 UTC | |
|
•Re: post variables in same order
by merlyn (Sage) on Jun 27, 2002 at 21:20 UTC | |
by inblosam (Monk) on Jun 27, 2002 at 23:16 UTC | |
|
Re: post variables in same order
by Aristotle (Chancellor) on Jun 27, 2002 at 21:46 UTC |