#143 PayPal Security
This episode shows how to encrypt the variables passed to PayPal and verify the authenticity of the payment notifications (IPN).
- Download:
- source codeProject Files in Zip (103 KB)
- mp4Full Size H.264 Video (21.2 MB)
- m4vSmaller H.264 Video (13.3 MB)
- webmFull Size VP8 Video (23 MB)
- ogvFull Size Theora Video (28.3 MB)
Service Objects
Models can quickly become a grab-bag of unrelated methods if behavior is constantly being pushed from the controller. Here I show how to refactor this using Concerns and Service Objects.
(12 minutes)
STI and Polymorphic Associations
Single Table Inheritance (STI) can help organize branching logic into separate classes, but a polymorphic association may be a better fit if there are unique database columns.
(14 minutes)
Guest User Record
Instead of presenting a sign up form to the user, consider creating a temporary guest record so the user can try out the application without filling in their information up front. They can then become a permanent member afterwards.
(9 minutes)
YAML Configuration (revised)
Keeping passwords and secret tokens in source control is a security risk. Here I show how to move these settings out into a YAML configuration file which can be loaded in as a hash or environment variables.
(8 minutes)
Memcached & Dalli
Memcached is an excellent cache store, and Dalli is the best way to interact with it through Ruby. Here I show various ways to use Memcached in a Rails app including how to set it up in production.
(12 minutes)