Order quantity increment condition for payment method
Per OP's comment, updated solution:
 public function evaluate(EntityInterface $entity) {
    $this-&gt;assertEntity($entity);
    /** @var \Drupal\commerce_order\Entity\OrderInterface $order */
    $order = $entity;
    $increment = $this-&gt;configuration['increment'];
    $total = 0;

    foreach ($order-&gt;getItems() as $order_item) {
      $total += $order_item-&gt;getQuantity();
    }
    if ($total % $increment !== 0) {  return FALSE;  }

    return TRUE;
  }