diff --git a/app/controllers/paypal_express_callbacks_controller.rb b/app/controllers/paypal_express_callbacks_controller.rb index 0ea0a0c..635e367 100644 --- a/app/controllers/paypal_express_callbacks_controller.rb +++ b/app/controllers/paypal_express_callbacks_controller.rb @@ -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