Both of them are verbs. 定 has the meaning of "decide". 订 has the meaning of "book" .
normally, they can be exchanged with each other, but in the situation get relation with law, they have a big difference.
定, means the conditions are confirmed already, they can not be revised any more. It emphasize result. For example, 定金,定购。
订, means the conditions are just a agreement, they may be revised. It emphasize the PROCESS. For example. 订婚,订货。
定价,can not be 订价。