module Spree
  OrdersController.class_eval do 
    before_filter :paysio_redirect

  private
    def paysio_redirect
      if session[:paysio_redirect]
        redirect_to session.delete(:paysio_redirect)
      end
    end
  end
end
module Spree
  OrdersController.class_eval do 
    before_filter :paysio_redirect

  private
    def paysio_redirect
      if (path = session.delete(:paysio_redirect))
        redirect_to path unless @order.errors.any?
      end
    end
  end
end
Add error check for order before redirect to paysio
Add error check for order before redirect to paysio
