Reputation: 1
I have had this code working for 6 months. Now, it stopped working. I have spent 2 days on PayPal support, Stackoverflow q/a, Google... I hope honestly this isn't a repeat question but I have searched truthfully for 2 days on Stackoverflow and haven't found an answer.
With local testing it produces a 200 answer and INVALID which is perfect for the sandbox. When I go to the IPN Simulator on PayPal it always returns red. Help me Obi Wan Kanobi => You're my only hope! Thank you for any help possible.
My reduced code is:
paypal_url = "https://www.paypal.com/cgi-bin/webscr"
strResponse = "cmd=_notify-validate&" & Request.Form
set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", paypal_url, false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send strResponse
if (objHttp.status <> 200 ) then
str = "ERROR 200"
elseif (objHttp.responseText = "VERIFIED") then
str = "VERIFIED"
elseif (objHttp.responseText = "INVALID") then
str = "INVALID"
else
str = "ERROR GENERAL"
end if
set objHttp = nothing
Upvotes: 0
Views: 231
Reputation: 143
I'm pretty sure the IPN simulator isn't working. I created a script with this:
<?php
date_default_timezone_set('America/Los_Angeles');
ini_set('error_log', 'ipn_errors.log');
$fp = fopen('.log', "a");
fwrite($fp, date("\tY-m-d H:i:s") . "\n");
foreach ($_REQUEST as $key => $value) {
fwrite($fp, "$key\t$value\n");
}
fwrite($fp, "--\n");
fclose($fp);
header("HTTP/1.1 200 OK");
?>
And pointed the IPN simulator to it. It is not writing to .log; it is not being called.
Upvotes: 0