public function extractOrderId(array $args)
    {
        if (is_numeric($args[0])) {
            // OC 2.0.
            $order_id = $args[0];
        } elseif (is_array($args[1])) {
            // OC 2.3.
            $route = $args[0];
            $event_args = $args[1];
            $output = $args[2];
            $order_id = substr($route, -strlen('/addOrder')) ===  '/addOrder' ? $output : $event_args[0];
        } else {
            // OC 2.2.
            $order_id = $args[2];
        }
        return $order_id;
    }