Prevent IPN errors on zero amount orders
This commit is contained in:
parent
db9c160527
commit
251f6c20fe
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue