JavaScript-NZ/javascript.org.nz — pull request #2 by PrototypeAlex (2014-11-15 23:53:32+00:00)
Title: Paypal integration

This is not yet finished, just wanted to touch base to see if there's any major problems with the flow.

Few things to note:
* I couldn't use the updateHandler in join.js because of some weirdness around password_compare, tried for an hour or two with no success.
* I'm not a fan of how Keystone does it's controllers, had to make separate controllers for each 'declined', 'approved', 'canceled' path, because I couldn't figure out how to view.render or res.render different templates in the same controller (the documentation is vague on this part).
* I'm using res.redirects for flow control, not sure if this is the best option, but can't think of a nicer solution atm.

Feedback requested, no need to hold back, I know it's pretty rough (I'm pretty time poor).

Things still TODO:
- [ ] Client side validation on the accepts COC, etc.
- [ ] Add content to the final screens (declined, approved, cancelled).
- [ ] Add flow for declined transactions to go back around to try again.
- [ ] Pass on the paypal creds to who-ever is going to deploy the site, they are just env vars for now.
- [ ] Cleanup from PR issues raised.