PayPal IPN & LC
J. Landman Gay
jacque at hyperactivesw.com
Tue May 1 23:49:22 EDT 2012
On 5/1/12 9:35 PM, Andre Garzia wrote:
> If I remember correctly, you need to output something from your IPN
> handler. Doing the whole POST stuff is not enough. You need to output
> something in the CGI or Apache will think it is a 500 error. You can't have
> 200 OK with no content, so just put ok.
That's exactly what's happening. I've trimmed my test script down to
almost nothing. There are no script errors but PayPal keeps reporting a
500 error now. Pierre suggested putting "ok" too but it didn't work. I
just tried it again:
on startup
read from stdin until empty
put it into tOrderData
LOG the long time && "Received:" && tOrderData
put "cmd=_notify-validate&" before tOrderData -- required response
put "https://www.sandbox.paypal.com/cgi-bin/webscr" into tPPAddr
put "curl --data" &"e& tOrderData "e&& tPPAddr into tPostCmd
put shell(tPostCmd) into tCurlRslt
put last word of tCurlRslt into tResponse -- "VERIFIED"; ignore the
ascii progress meter
LOG the long time && "Response:" && tResponse
put "ok"
end startup
This one uses curl but the same problem happens with libURL. My log
shows all the correct data coming in.
I'll look at the references you posted, but could you let me know if the
above script looks right? I've also sent a support ticket to my ISP,
because it acts like port 443 outbound might be blocked.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list