Paypal / Amazon IPN Listener (and responder)

For a few years now I’ve made some spare change selling a digital download with a PayPal “buy it now” button leading to an immediate download page. I noticed a definite downtrend in sales, and thought it might have something to do with the number of people that are shopping on their SmartPhone rather than their laptop. That would reduce most of the impulse buys, because the .zip file would not be accessible for downloading on a phone, and most people would not feel inspired to return to the page on their laptop.

So I decided to investigate the PayPal IPN system that will POST a notification to your server after every transaction. I figured this could be turned into a notification system that sends somebody a download link that they could access from their laptop later, which would capture mobile phone traffic and turn it into potential sales.

Down, down the rabbit hole I want pursuing the “simple” process of building a linked server/database, setting up an outgoing email service, and tying it altogether.

And along the way, I came across the Amazon Pay service, and decided to integrate those buttons as well.

And while I was at it, why not make a very simple front end UI with react? OK, so this ended up being much more involved than I initially estimated, but it’s done and it works, and I’m releasing my system as an open source repository to save you from having to go through this entire process. Because I believe in this credo:

Open Source: Reduce suck. Hopefully.

Most of the PayPal IPN repositories I have found on github handle the verification of the IPN message, but don’t go further in terms of what to do after the message is validated.

You will find this project published and documented at: https://github.com/lexjacobs/paypal-amazon-ipn-listener-emailer-database-ui