In the case of an order issued pursuant to § 40-30-304, the court shall order the analysis and payment, if necessary. In the case of an order under § 40-30-305, the court may require the petitioner to pay for the analysis.