    # File lib/active_merchant/billing/check.rb, line 52
          def valid_routing_number?
            d = routing_number.to_s.split('').map(&:to_i).select { |d| (0..9).include?(d) }
            case d.size
              when 9 then
                checksum = ((3 * (d[0] + d[3] + d[6])) +
                            (7 * (d[1] + d[4] + d[7])) +
                                 (d[2] + d[5] + d[8])) % 10
                case checksum
                  when 0 then true
                  else        false
                end
              else false
            end
          end