Regarding "Action Required before October 7, 2013" email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PayPal email I received regarding changes to the IPN code contains incorrect information.
The code examples are missing the "content-length" header. Without this header, the IPN script will fail.
The example PHP code stated this :
PHP
// post back to PayPal system to validate
$header="POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .="Content-Type: application/x-www-form-urlencoded\r\n";
$header .="Host: www.paypal.com\r\n";
$header .="Connection: close\r\n\r\n";
The correct PHP code is :
$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n";
$header .= "Host: www.paypal.com\r\n";
$header .= "Connection: close\r\n\r\n";
You may want to consider fixing this in your next notification email. I didn't relaize there was even an issue until I started receiving complaints from customers this morning about orders not being processed.
This is the error message I received when the 'content-length' header was not included :
HTTP/1.1 411 Length Required\r\n
Server: AkamaiGHost\r\n
Mime-Version: 1.0\r\n
Content-Type: text/html\r\n
Content-Length: 222\r\n
Expires: Fri, 19 Jul 2013 16:36:36 GMT\r\n
Date: Fri, 19 Jul 2013 16:36:36 GMT\r\n
Connection: close\r\n
\r\n
<HTML><HEAD>\n
<TITLE>Bad Request</TITLE>\n
</HEAD><BODY>\n
<H1>Bad Request</H1>\n
Your browser sent a request that this server could not understand.<P>\n
Reference*********************************************\n
</BODY>\n
</HTML>\n
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I
@Mayhem30 wrote:The PayPal email I received regarding changes to the IPN code contains incorrect information.
The correct PHP code is :
$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n";
$header .= "Host: www.paypal.com\r\n";
$header .= "Connection: close\r\n\r\n";
I have modified my headers the same way, and now I am getting an error HTTP/1.1 301 Moved Permanently.
It is getting quite frustrating, don't you think ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Mayhem30 wrote:Great ... what URL does it show it's moving to?
https://www.paypal.com/home
The last try got me an error 302 with the same Location:.
I need my script live so I give up for now. If I did half to my customers as what Paypal does to us, I would be out of business 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Mitch-Match wrote:I
@Mayhem30 wrote:The PayPal email I received regarding changes to the IPN code contains incorrect information.
The correct PHP code is :
$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) . "\r\n";
$header .= "Host: www.paypal.com\r\n";
$header .= "Connection: close\r\n\r\n";
I have modified my headers the same way, and now I am getting an error HTTP/1.1 301 Moved Permanently.
It is getting quite frustrating, don't you think ?
I spent most part of the day running experiments to see what is going on. To no avail.
A script which worked perfectly with the 1.00 headers definitly does not work with the new 1.1 headers we are requested to use.
I am VERY CONCERNED. Why bother millions of users with an email to get them to use headers which DO NOT WORK ? Don't people at Paypal test what they send in the big world ? Why **bleep** up customers scripts and not provide adequate support ?
This is frustrating, agravating, worrysome, and silly at best.
I wish Paypal personnel had at least a tiny bit of respect for the customers who bring in the good money they get for mistreating them 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't had time to test things - but are the 1.0 headers / code format still working properly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, the older headers code works fine. Both with or without SSL.
Seems the new code simply does not get anywhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also finding my IPN script breaks when using the new HTTP 1.1 headers as specified by PayPal.
The result I get is this, even though I sent a Content-length header:
HTTP/1.0 411 Length Required
Mime-Version: 1.0
Server: AkamaiGHost
Content-Type: text/html
Date: Thu, 25 Jul 2013 19:29:14 GMT
Connection: close
Content-Length: 222
Expires: Thu, 25 Jul 2013 19:29:14 GMT
<HTML><HEAD>
<TITLE>Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Reference #7.4c240a3.13780554.9aa11
</HTML>
Have reverted to HTTP 1.0 headers. Perhaps the Akami server doesn't speak HTML 1.1 yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some more info here: http://www.codingforum.org/f5/paypal-ipn-http-1-1-a-7423-2.html
My code was using:
$fp = fsockopen('www.paypal.com', 80, $errno, $errstr, 30);
where this advises using:
$fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30);
- « Previous page
-
- 1
- 2
- Next page »
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.