I'm using PayPal as payment gateway. I pass the address of one of my website's non-browsable pages in the notify_url
param of the querystring, along with other info. Upon receiving a ping from PayPal server on my notify page, I take appropriate actions to mark user as member.
Now the question I want to ask: what if someone reads the value of notify_url
parameter from the original querystring and pings that page manually from his browser with fake transaction id, amount etc. How do I make sure this call was actually from PayPal server?
One preliminary check that came to my mind was to check Request.UserHostAddress
and compare it with the PayPal server's IP address. I implemented this but would still like to hear from the experts. Is it safe enough? Can people fake UserHostAddress
when making a call to a webpage?