php - Paypal IPN returning HTTP/1.1 200 OK -


I am testing to integrate a website into PayPal using Web Payments standard and HTML variables.

I have written a simple PHP script to handle IPN information.

A simple ' verified ' or ' INVALID response according to the PayPal server, once you ping the received data back to PayPal.

In my handler, I am comparing case sensitive strings for those two keywords, if none of these are known keywords, then it is considered as an error.

  & lt ;? Php $ fp = fsockopen ($ socket_url, 80, $ error, $ errstr, 10); If (! $ Fp) {// socket error returned false; } Other {fputs ($ fp, $ header. $ Req); $ Is_ok = false; While (! FIF ($ fp)) {$ res = fgets ($ fp, 1024); If (srcmp ("verified", $ this-> ipn_response) == 0} {// do something ...} // if the IPN post 'INVALID' and if (SRCMP ($ SES, "INVALID") = = 0) {fclose ($ fp); return false; } Else {echo "Unknown response from PayPal: $ res"; Fclose ($ fp); return false; }} Fclose ($ fp); Back true; }? & Gt;  

My error message shows that I'm getting 'HTTP / 1.1 200 OK' response from PayPal.

Unknown response from PayPal: 'HTTP / 1.1 200 OK'

Has the PayPal API changed, or am I doing something wrong?

The response to PayPal is in the body of the HTTP response before you can access the HTTP header Or, alternatively, as long as you can not find a blank line, keep reading lines, and the next line will be the body.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -