PayPal-IPN Fails
Hi so im using cloudfare to conect my domain to my server, but for some reason it doesnt handle the POST requests of PayPal? What do i do? Cuz everything worked fine untill around 2 days ago.
64 Replies
that all does not work :/
check the ‘bot fight mode’ blocks, some days ago they changed the way it works and now it is blocking ‘post’ requests...
Is that for a paid thing? Cuz I can’t seem to find it others I will look again in a hour or so but couldn’t find rq en xD
try disabling it and see if you get the ‘post’ requests again.
Dash > Domain > Security > Bots > Bot Fight Mode | ON/OFF
Doesn’t show me it :/

in the new panel... ok.
Overview > Bot Traffic > Bot fight mode
Alr dissabled :/
you should check the logs and see the time of the ‘post’ requests and see if they were blocked by cloudflare or by the origin server.
in my case it was the ‘bot fight mode’.
You mean the logs from cloudfare? Cuz I have been searching for those and the one I found where empty :/
And nothing got changed on my own server so it would be weird if it just started blocking it after a few days
Security > Analytics.
Ye that all says no logs
Whenever you access your website using your domain, you should see the requests in that section.
For Some reason it doesn’t log anything there
Do I need to add a filter or security rule?
No, at least not that I know.
In my case I do have some rules, so...
Oh hmm
Idk why it just stopped working it’s all so weird 😭
Alr tried contacting Paypal but they said nothing was wrong
in Analytics > Events, you have all blocked requests

It also stopped getting any info here

that's weird, if when you enter your domain (example.com) it works, but you don't receive any request through cloudflare, possibly it's a problem with the DNS or NS.
Oh hm

did you buy the domain from cloudflare or are you using it as an extra layer?
Extra later
Later
Layer*
It’s via nameservers
From namecheap
that's the problem
Oh why then? Cuz it first worked
you need to go to your domain provider and see what happened there.
I will try to contact them and come back to you alr?
@Darkkaiser they told me everything gets processed first by the DNS provider and then by my server
So it has to do with the server or Cloudflare but idk how I can find it :NotLikeThis:
@Sp1nkel, ... are you the same person from the Cloudflare Community thread I mentioned above?
Ye but it was easier here couldn’t find the discord but I found it
And on disc it’s more interactive and stuff
Great with that clarity, so we can avoid spreading the same topic across multiple distinct platforms. 🙂
Ohhh Mb :NotLikeThis:
With the addition of your domain name above, -
Your DNS records aren't Proxied (:cloudflare:), so Cloudflare is only working as a DNS provider for you.
The IPN requests (if they are being sent by PayPal) will be going directly from PayPal to your own server.
Huh
Hmm cuz it looks like (for me) it looks like it does send but it doesn’t recive it at the server
It’s just so weird 😭 cuz Paypal ain’t giving me info and my server is also not giving any info
The "DNS only" thing from your screenshot above means that PayPal will go directly to the IP address of you own server.
E.g. the IP address from Infraly, LLC.
So it will be somewhere between PayPal and Infraly, LLC, where it is going wrong.
... Are you able to share (at least, something of) what you see on the IPN History page on PayPal?
Ye ofc ofc give me 15 min will be at my computer then
(all testing by sending payments on other acc xD


With no HTTP code ("
HTTP-antwoordcode
"), the most likely reason would be that PayPal wasn't able to reach your server (e.g. network error, or similar).
If you change the Proxy status for the "ipn
" DNS record to Proxied (:cloudflare:), and try again, - does that make a difference?nope also doesnt seem to work :/
its so weird cuz if i send the like ipn message via my own computer it works correctly
exactly the same

HTTP code ("HTTP-antwoordcode") is
500
there.
So at least, there is a connection to something.when i instantly open it second time that it sends it just vanishes randomly
like second time that paypal tries to send
What kind of stuff do you run for the
/paypal-ipn
endpoint?
Some shopping system / plugin you downloaded?so when its oorspronkelijk (first message) it says 500 and when it resend it goes to npothing
Something you built on your own?
Or what exactly?
made it myself xD
it verifies the payment tht it came trough
and logs it
so doesnt do much more then verify
What is being logged on the
500
then?you mean server side?
Yep.
nothing
dont get any error
and when i do a post request exactly like paypal but on my own machine it works perfectly fine
Have you been tail'ing the access log (not the error log, but access log), to see activity there?
yep
doesnt show me anything there
from today
Are you able to share the home-made code?
in dms if possible?
And perhaps stuff like your web server configuration, how it's setup, and similar?
Go ahead.
im using nginx to connect it to the internet
this is /etc/nginx/sites-available/ipn.2b2t.market
Have you tried adding
access_log
and error_log
to that nginx configuration, to see what nginx is seeing on them?
Or only looked in the logs from your own code (which you sent privately)?dont got any logs
isnt sending me any
gonna try to get in touch again with paypal tommorow
You can try adding something like:
And then look at what you have (or are getting) in "
/tmp/access_ipn.2b2t.market.log
" and "/tmp/error_ipn.2b2t.market.log
".
I'm suspecting the most recent 500
error may eventually be something between nginx and your application.Impossible cuz when I send the exact same POST requests to the domain via a other server or my computer it works
I'd go as far as to say nothing is really impossible, when it comes to tech/IT stuff.
But anyway, initially, without Poxied (:cloudflare:), it seemed like PayPal's netwrok couldn't reach your server.
Now, it seems like there's at least life (through Cloudflare), - but some unhandled error somewhere, causing a 500 to PayPal.
If Cloudflare was blocking it (e.g. WAF or Bot Fight Mode), it should have been a
403
on the HTTP code ("HTTP-antwoordcode").i checked it but it also gives error 500 for a short time (first time it sends the IPN) the second time it tries to send it to my server the error just vanishes