app/controllers/supercharged/gateway_notifications_controller.rb in supercharged-2.0.1 vs app/controllers/supercharged/gateway_notifications_controller.rb in supercharged-2.0.2

- old
+ new

@@ -17,13 +17,17 @@ "charge not found" end if error persistent_logger.error("Error: #{error.inspect}") - if @notification.charge + + charge = @notification.charge + + if charge && !charge.error? @notification.charge.failed! @notification.charge.update_attribute(:error, error) end + head :bad_request else persistent_logger.info("Success") @notification.approve if @notification.need_response?