1

Topic: 2026/2/5 PayPal bug

I found a minor bug in the code that receives payment notifications from PayPal.
We'll see if it will make any difference to the general unreliability there. smile

2

Re: 2026/2/5 PayPal bug

It turns out my fix was not complete. I dug into it more today. It's funny what the cause was.

So, when PayPal notifies you about payments, it sends a message to your server. You verify that it's a real notification by sending a request back to PayPal.

That request went to www.paypal.com.

It turns out, PayPal now uses Content Delivery Networks for their website. They actually use two.

When verifying your payment, if I got Fastly, it responded with VERIFIED, which worked.

If I got Cloudflare, it uses chunked transfer encoding, it responded with VERIFIED(newline)0, which did not.

These days, PayPal samples use ipnpb.paypal.com instead of www.paypal.com. This bypasses their Content Delivery Networks, and so that works. I've changed my code to use ipnpb.paypal.com. Who knows how long ago they changed this, but they did keep the old address working, kind of.

I've also changed my code to use cURL instead of doing a completely hand-written HTTP request. cURL supports chunked transfer encoding, so in the future this particular problem will not crop up again.

Definitely let me know if you still have problems. I expect it will work a lot better! Thank you for all your support over the years, and your patience dealing with this half-broken PayPal code smile

God bless.

James