U++ Forum - RDF feed
https://www.ultimatepp.org/forums/
Instant Payement Notification (IPN) server for PayPal
https://www.ultimatepp.org/forums/index.php?t=rview&goto=35429&th=6542#msg_35429
I developed an IPN (Instant Payement Notification) server for PayPal; it allows automated handling of customer's purchases with PayPal.
The server is based on SCGI protocol, so you need an SCGI enabled server.
There's also a demo application, IPNServerDemo.
To test it you must :
1) Setup an SCGI handler in your server; for Apache server there are many sites with good tutorials, Google is your friend
2) Once done point 1, you've got a PORT NUMBER, which must be used in server setup, see comments in code
3) The IPNServer provides 2 callbacks, one for VERIFIED paypal response and one for INVALID response. In demo code, on VERIFIED it just dumps the provided variables on Cout(); on INVALID it just logs a message on Cout().
In real application, you should obviously do something with variables, like checking amounts, and so on.
4) The server is JUST for IPN protocol handling; it doesn't check for repeated IPN messages on same transaction, frauds, and so on.... those must be done in your VERIFIED handler.
5) The demo connects to PayPal's sandbox testing server, see code comments; if you want to use in a real app, just change it !
6) By now the server is single-threaded, so if you get tons of transactions it will probably fail.... OK, if you get tons of transactions you'll probably be having a dring on a beach at Seychelles islands.....