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
}}}
Original issue reported on code.google.com by subim...@gmail.com on 26 Dec 2009 at 6:03
Original issue reported on code.google.com by
subim...@gmail.com
on 26 Dec 2009 at 6:03