#!/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";
In reply to post variables in same order by inblosam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |