| Issue 193: | Refactor PayPal IPN code in Order.rb | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The PayPal IPN methods are a bit strange in Order.rb. In each of them, you're passing in an order object. This seems like a "duh" candidate to be an instance method. Anyone see a reason it shouldn't be switched? Additionally, "matches_ipn" looks like it should be a ? method. For example, take the following code in PaypalController {{{ if notification.complete? && Order.matches_ipn(notification, order, params) Order.pass_ipn(order, params[:txn_id]) else Order.fail_ipn(order) end }}} Would be much cleaner as the following. {{{ if notification.complete? && order.matches_ipn?(notification) order.pass_ipn(params[:txn_id]) else order.fail_ipn() end }}}
Feb 6, 2010
Project Member
#1
subim...@gmail.com
Status:
Fixed
|