Greetings,
I have been working for many many many hours on the password management script and can't seem to get it to acknowledge the IPN. I've followed all the tips I could find online, and for some reason I'm still unable to get the script to work. I believe I may have figure out the problem, but am unsure as to how to implement it.
I tested the paypal IPN link:
http://www.paypal.com/cg...scr&cmd=_notify-validate
and saw that it returned INVALID, as it should.
While looking through the script, I recognized that the POST being constructed is made from the following code.
my $req = new HTTP::Request("POST", $PAYPAL_URL);
$req->content_type("application/x-www-form-urlencoded");
$req->content(query_string() . "&cmd=_notify-validate");
Assume the paypal url is 'http://www.paypal.com/cgi-bin/webscr'
I'm assuming that most servers have their query_string() variable set to '?'. If this were so, sending the request would create the string 'http://www.paypal.com/cgi-bin/webscr?&cmd=_notify-validate' which is what I am looking for.
Unfortunately, when I post to the site I am receiving neither INVAID nor VERIFIED. This leads me to believe that the link that is being created does not read 'http://www.paypal.com/cgi-bin/webscr?&cmd=_notify-validate'
I looked at my server's environment variables for perl and saw that the query_string() variable = 'action=20'
I could see how this causes a problem as the link constructed would be 'http://www.paypal.com/cgi-bin/webscraction=20&cmd=_notify-validate'. Obviously that would result in the error i'm receiving.
After this long winded explanation of what I've deduced, I'd like to know how I can adjust the URL to accomodate the 'action=20' variable that I'm sending. I tried hardcoding the $PAYPAL_URL variable to 'http://www.paypal.com/cgi-bin/webscr?&cmd=_notify-validate', but to no avail.
Many thanks to whomever can assist me with this problem. Sorry for the longwinded explanation, but I wanted to show everybody what my thought process was. Thanks again for future help. Take care.