learning-unlimited/ESP-Website — pull request #1145 by pricem (2014-03-16 17:33:21+00:00)
Title: Credit card payments using Stripe

LU has occasionally used First Data for credit card processing. Besides charging us a monthly fee, the software they gave us was very outdated and didn't support posting payments from multiple URLs (essential for running multiple programs as we do). We also saw a few transactions go through that our server never heard about, which was worrying.

The proposed change is to use [Stripe](https://www.stripe.com) instead. While Stripe has a higher fee per transaction, there is no monthly fee and (more importantly) their software is much more modern. You don't have to send them any data about your users if you don't want to, so I've removed the billing/shipping address form. Also, after the user has submitted their card info, they are not charged immediately. Instead, Stripe sends us a unique string token, and then we can send it back using the ``stripe`` Python library in order to actually charge the card.

While we do not see the credit card numbers, because this code deals with payments it should be held to high standards. I am willing to go through some revisions. Ideas for automated tests would be appreciated.

This pull request should be manually tested. E-mail me to obtain LU's Stripe account keys which you should enter in local_settings.py. You will need to run ``./manage.py migrate``, then add the Stripe credit card module to a program. Everything else should be intuitive; refer to [Stripe's documentation](https://stripe.com/docs/testing) for credit card numbers you can use to trigger successful payments and various types of exceptions.

Note that MIT ESP is using a completely different system (Cybersource) which was originally mandated by their university administration, although this may not be true now. The proposed change would immediately apply to all other chapters after the next stable release.