Prevent IPN errors on zero amount orders

This commit is contained in:
Brian Quinn 2011-01-11 13:13:58 +00:00
parent db9c160527
commit 251f6c20fe
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class PaypalExpressCallbacksController < Spree::BaseController
@notification = Paypal::Notification.new(request.raw_post)
# we only care about eChecks (for now?)
if @notification.params["payment_type"] == "echeck" && @notification.acknowledge && @payment
if @notification.params["payment_type"] == "echeck" && @notification.acknowledge && @payment && @order.total >= @payment.amount
case @notification.params["payment_status"]
when "Denied"
create_txn PaypalTxn::TxnType::DENIED