If the witness described in § 23A-14-19 is summoned to attend and testify in this state, he shall be offered twenty-one cents for each mile by the ordinarily traveled route to and from the court where the prosecution is pending, twenty dollars for each day that he is required to travel and attend as a witness, and twenty-five dollars for each night he is required to remain away from his residence.
SDCL 23A-14-20