My Instant Payment Notification (IPN) handling perl script starting failing today (i have not changed the script in a year nor have a changed any settings). Specifically the post back to PayPal system to validate seems to now return INVALID. Has anything changed with how the IPN post back works? Here is the relevant part of my IPN perl script which as of today starts failing... please let me know if anything needs to now change #!/usr/bin/perl # read post from PayPal system and add 'cmd' read (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= '&cmd=_notify-validate'; # post back to PayPal system to validate 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); $logr ="\n"; $logr .= $query."/n"; $res = $ua->request($req); # split posted variables into pairs @pairs = split(/&/, $query); $count = 0; foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $variable{$name} = $value; $count++; } $status = $res->content; print "content-type: text/plain\n\n"; $logr .=$res; if ($res->is_error) { # HTTP error print "<xhttp>HTTP Error</xhttp>"; $logr .="ERROR: HTTP"; } elsif ($res->content eq 'VERIFIED') { # code here to handle verified 🙂 } elsif ($res->content eq 'INVALID') { # This is what im getting now!!! } else { # unknown error print "unknown error"; $logr .= "unknown error"; }
... View more