tomash/spree-pp-website-standard — pull request #15 by hoverlover (2012-03-17 04:31:58+00:00)
Title: Paypal payment method

I know this PR has a commit from another outstanding PR, but this change needed to rename a file contained in that commit. Hard to explain. Sorry.

Anyway, this PR basically defines a new PaymentMethod for use with PayPal. The reason this was needed is because somewhere along the way (maybe the Spree 1.0 release?) the IPN notifications stopped working. I traced it back to the fact that order state transitions in the `Spree::PaymentNotificationsController` were failing. The reason was that the order's payment source was nil, but in order to process the payment Spree required a payment source. This was because `Spree::PaymentSource#source_required?` method is hard-coding `true`. This new payment method I created is basically a dummy payment method that can be used when configuring the PayPal payment method in the admin interface. It simply returns `false` in the `source_required?` method.